Qwt User's Guide
svn
|
#include <qwt_series_data.h>
Inherited by QwtArraySeriesData< T >.
Public Member Functions | |
virtual QRectF | boundingRect () const =0 |
QwtSeriesData () | |
virtual T | sample (size_t i) const =0 |
virtual void | setRectOfInterest (const QRectF &) |
virtual size_t | size () const =0 |
virtual | ~QwtSeriesData () |
Protected Attributes | |
QRectF | d_boundingRect |
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.
QwtSeriesData< T >::QwtSeriesData | ( | ) |
Constructor.
QwtSeriesData< T >::~QwtSeriesData | ( | ) | [virtual] |
Destructor.
virtual QRectF QwtSeriesData< T >::boundingRect | ( | ) | const [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 rect.
Implemented in QwtSyntheticPointData, QwtCPointerData, QwtPointArrayData, QwtSetSeriesData, QwtIntervalSeriesData, QwtPoint3DSeriesData, and QwtPointSeriesData.
virtual T QwtSeriesData< T >::sample | ( | size_t | i | ) | const [pure virtual] |
Return a sample
i | Index |
Implemented in QwtSyntheticPointData, QwtCPointerData, QwtPointArrayData, QwtArraySeriesData< T >, QwtArraySeriesData< QwtIntervalSample >, QwtArraySeriesData< QPointF >, QwtArraySeriesData< QwtPoint3D >, and QwtArraySeriesData< QwtSetSample >.
void QwtSeriesData< T >::setRectOfInterest | ( | const QRectF & | ) | [virtual] |
Set a the "rect of interest"
QwtPlotSeriesItem defines the current area of the plot canvas as "rect of interest" ( QwtPlotSeriesItem::updateScaleDiv() ). It can be used to implement different levels of details.
The default implementation does nothing.
Reimplemented in QwtSyntheticPointData.
virtual size_t QwtSeriesData< T >::size | ( | ) | const [pure virtual] |
Implemented in QwtSyntheticPointData, QwtCPointerData, QwtPointArrayData, QwtArraySeriesData< T >, QwtArraySeriesData< QwtIntervalSample >, QwtArraySeriesData< QPointF >, QwtArraySeriesData< QwtPoint3D >, and QwtArraySeriesData< QwtSetSample >.
QRectF QwtSeriesData< T >::d_boundingRect [mutable, protected] |
Can be used to cache a calculated bounding rectangle.