Abstract interface for iterating over samples. More...
#include <qwt_series_data.h>
Public Member Functions | |
virtual QRectF | boundingRect () const =0 |
QwtSeriesData () | |
Constructor. More... | |
virtual T | sample (size_t i) const =0 |
virtual void | setRectOfInterest (const QRectF &rect) |
virtual size_t | size () const =0 |
virtual | ~QwtSeriesData () |
Destructor. More... | |
Protected Attributes | |
QRectF | d_boundingRect |
Can be used to cache a calculated bounding rectangle. More... | |
Private Member Functions | |
QwtSeriesData< T > & | operator= (const QwtSeriesData< T > &) |
Abstract interface for iterating over samples.
Qwt offers several implementations of the QwtSeriesData API, but in situations, where data of an application specific format needs to be displayed, without having to copy it, it is recommended to implement an individual data access.
A subclass of QwtSeriesData<QPointF> must implement:
Definition at line 47 of file qwt_series_data.h.
QwtSeriesData< T >::QwtSeriesData | ( | ) |
Constructor.
Definition at line 111 of file qwt_series_data.h.
|
virtual |
Destructor.
Definition at line 117 of file qwt_series_data.h.
|
pure virtual |
Calculate the bounding rect of all samples
The bounding rect is necessary for autoscaling and can be used for a couple of painting optimizations.
qwtBoundingRect(...) offers slow implementations iterating over the samples. For large sets it is recommended to implement something faster f.e. by caching the bounding rectangle.
Implemented in QwtTradingChartData, QwtSetSeriesData, QwtIntervalSeriesData, QwtPoint3DSeriesData, QwtPointSeriesData, QwtSyntheticPointData, QwtCPointerData, DataSeriesBase, QwtPointArrayData, and PointSeriesXY.
|
private |
|
pure virtual |
Return a sample
i | Index |
Implemented in QwtArraySeriesData< T >, QwtArraySeriesData< QwtIntervalSample >, QwtArraySeriesData< QwtOHLCSample >, QwtArraySeriesData< QPointF >, QwtArraySeriesData< QwtPoint3D >, QwtArraySeriesData< QwtSetSample >, QwtSyntheticPointData, QwtCPointerData, QwtPointArrayData, DataSeriesBase, and PointSeriesXY.
|
virtual |
Set a the "rect of interest"
QwtPlotSeriesItem defines the current area of the plot canvas as "rectangle of interest" ( QwtPlotSeriesItem::updateScaleDiv() ). It can be used to implement different levels of details.
The default implementation does nothing.
rect | Rectangle of interest |
Reimplemented in QwtSyntheticPointData.
Definition at line 122 of file qwt_series_data.h.
|
pure virtual |
Implemented in QwtArraySeriesData< T >, QwtArraySeriesData< QwtIntervalSample >, QwtArraySeriesData< QwtOHLCSample >, QwtArraySeriesData< QPointF >, QwtArraySeriesData< QwtPoint3D >, QwtArraySeriesData< QwtSetSample >, QwtSyntheticPointData, QwtCPointerData, QwtPointArrayData, and DataSeriesBase.
|
mutableprotected |
Can be used to cache a calculated bounding rectangle.
Definition at line 104 of file qwt_series_data.h.