Qwt User's Guide svn
Public Member Functions | Protected Attributes
QwtCPointerData Class Reference

#include <qwt_series_data.h>

Inherits QwtSeriesData< QPointF >.

List of all members.

Public Member Functions

virtual QRectF boundingRect () const
 QwtCPointerData (const double *x, const double *y, size_t size)
virtual QPointF sample (size_t i) const
virtual void setRectOfInterest (const QRectF &)
virtual size_t size () const
const double * xData () const
const double * yData () const

Protected Attributes

QRectF d_boundingRect

Detailed Description

Data class containing two pointers to memory blocks of doubles.


Constructor & Destructor Documentation

QwtCPointerData::QwtCPointerData ( const double *  x,
const double *  y,
size_t  size 
)

Constructor

Parameters:
xArray of x values
yArray of y values
sizeSize of the x and y arrays
Warning:
The programmer must assure that the memory blocks referenced by the pointers remain valid during the lifetime of the QwtPlotCPointer object.
See also:
QwtPlotCurve::setData(), QwtPlotCurve::setRawSamples()

Member Function Documentation

QRectF QwtCPointerData::boundingRect ( ) const [virtual]

Calculate the bounding rect.

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

Returns:
Bounding rectangle

Implements QwtSeriesData< QPointF >.

QPointF QwtCPointerData::sample ( size_t  i) const [virtual]

Return the sample at position i

Parameters:
iIndex
Returns:
Sample at position i

Implements QwtSeriesData< QPointF >.

size_t QwtCPointerData::size ( ) const [virtual]
Returns:
Size of the data set

Implements QwtSeriesData< QPointF >.

const double * QwtCPointerData::xData ( ) const
Returns:
Array of the x-values
const double * QwtCPointerData::yData ( ) const
Returns:
Array of the y-values

Member Data Documentation

QRectF QwtSeriesData< QPointF >::d_boundingRect [mutable, protected, inherited]

Can be used to cache a calculated bounding rectangle.

qmi style