Qwt User's Guide: QwtPointArrayData Class Reference

Qwt User's Guide 6.1.4

Public Member Functions | List of all members
QwtPointArrayData Class Reference

Interface for iterating over two QVector<double> objects. More...

`#include <qwt_point_data.h>`

Inheritance diagram for QwtPointArrayData:
[legend]

## Public Member Functions
| QwtPointArrayData (const QVector< double > &x, const QVector< double > &y)
| QwtPointArrayData (const double *x, const double *y, size_t size)
virtual QRectF | boundingRect () const
| Calculate the bounding rectangle. More...
virtual size_t | size () const
virtual QPointF | sample (size_t index) const
const QVector< double > & | xData () const
const QVector< double > & | yData () const
Public Member Functions inherited from QwtSeriesData< QPointF >
| QwtSeriesData ()
| Constructor.
virtual | ~QwtSeriesData ()
| Destructor.
virtual void | setRectOfInterest (const QRectF &rect)

## Additional Inherited Members
Protected Attributes inherited from QwtSeriesData< QPointF >
QRectF | d_boundingRect
| Can be used to cache a calculated bounding rectangle.

## Detailed Description

Interface for iterating over two QVector<double> objects.

## Constructor & Destructor Documentation

## ◆ QwtPointArrayData() [1/2]

QwtPointArrayData::QwtPointArrayData | ( | const QVector< double > & | x,
|  | const QVector< double > & | y
| ) |  |

Constructor

Parameters

  x | Array of x values
  y | Array of y values

See also
  QwtPlotCurve::setData(), QwtPlotCurve::setSamples()

## ◆ QwtPointArrayData() [2/2]

QwtPointArrayData::QwtPointArrayData | ( | const double * | x,
|  | const double * | y,
|  | size_t | size
| ) |  |

Constructor

Parameters

  x | Array of x values
  y | Array of y values
  size | Size of the x and y arrays

See also
  QwtPlotCurve::setData(), QwtPlotCurve::setSamples()

## Member Function Documentation

## ◆ boundingRect()

QRectF QwtPointArrayData::boundingRect | ( |  | ) | const
| virtual

Calculate the bounding rectangle.

The bounding rectangle is calculated once by iterating over all points and is stored for all following requests.

Returns
  Bounding rectangle

Implements QwtSeriesData< QPointF >.

## ◆ sample()

QPointF QwtPointArrayData::sample | ( | size_t | index | ) | const
| virtual

Return the sample at position i

Parameters

  index | Index

Returns
  Sample at position i

Implements QwtSeriesData< QPointF >.

## ◆ size()

size_t QwtPointArrayData::size | ( |  | ) | const
| virtual

Returns
  Size of the data set

Implements QwtSeriesData< QPointF >.

## ◆ xData()

const QVector< double > & QwtPointArrayData::xData | ( |  | ) | const

Returns
  Array of the x-values

## ◆ yData()

const QVector< double > & QwtPointArrayData::yData | ( |  | ) | const

Returns
  Array of the y-values