Qwt User's Guide 6.3.0
|
Abstract interface for iterating over samples. More...
#include <qwt_series_data.h>
Public Member Functions | |
QwtSeriesData () | |
Constructor. | |
virtual | ~QwtSeriesData () |
Destructor. | |
virtual size_t | size () const =0 |
virtual T | sample (size_t i) const =0 |
T | firstSample () const |
T | lastSample () const |
virtual QRectF | boundingRect () const |
virtual void | setRectOfInterest (const QRectF &rect) |
Protected Attributes | |
QRectF | cachedBoundingRect |
Can be used to cache a calculated bounding rectangle. | |
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 49 of file qwt_series_data.h.
QwtSeriesData< T >::QwtSeriesData | ( | ) |
Constructor.
Definition at line 130 of file qwt_series_data.h.
|
virtual |
Destructor.
Definition at line 136 of file qwt_series_data.h.
|
inlinevirtual |
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.
Reimplemented in QwtSyntheticPointData.
Definition at line 100 of file qwt_series_data.h.
|
inline |
Returns the first sample in the list.
Definition at line 80 of file qwt_series_data.h.
|
inline |
Returns the first sample in the list.
Definition at line 86 of file qwt_series_data.h.
|
pure virtual |
Return a sample
i | Index |
Implemented in QwtPointArrayData< T >, QwtCPointerData< T >, QwtValuePointData< T >, QwtCPointerValueData< T >, QwtSyntheticPointData, and QwtArraySeriesData< T >.
|
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 141 of file qwt_series_data.h.
|
pure virtual |
Implemented in QwtPointArrayData< T >, QwtCPointerData< T >, QwtValuePointData< T >, QwtCPointerValueData< T >, QwtSyntheticPointData, and QwtArraySeriesData< T >.
|
mutableprotected |
Can be used to cache a calculated bounding rectangle.
Definition at line 123 of file qwt_series_data.h.