Qwt User's Guide
svn
|
#include <qwt_series_data.h>
Inherits QwtSeriesData< T >.
Public Member Functions | |
virtual QRectF | boundingRect () const =0 |
QwtArraySeriesData () | |
QwtArraySeriesData (const QVector< T > &) | |
virtual T | sample (size_t) const |
const QVector< T > | samples () const |
virtual void | setRectOfInterest (const QRectF &) |
void | setSamples (const QVector< T > &) |
virtual size_t | size () const |
Protected Attributes | |
QRectF | d_boundingRect |
QVector< T > | d_samples |
Template class for data, that is organized as QVector.
QVector uses implicit data sharing and can be passed around as argument efficiently.
QwtArraySeriesData< T >::QwtArraySeriesData | ( | ) |
Constructor.
QwtArraySeriesData< T >::QwtArraySeriesData | ( | const QVector< T > & | samples | ) |
Constructor
samples | Array of samples |
virtual QRectF QwtSeriesData< T >::boundingRect | ( | ) | const [pure virtual, inherited] |
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.
T QwtArraySeriesData< T >::sample | ( | size_t | i | ) | const [virtual] |
const QVector< T > QwtArraySeriesData< T >::samples | ( | ) | const |
void QwtSeriesData< T >::setRectOfInterest | ( | const QRectF & | ) | [virtual, inherited] |
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.
void QwtArraySeriesData< T >::setSamples | ( | const QVector< T > & | samples | ) |
Assign an array of samples
samples | Array of samples |
size_t QwtArraySeriesData< T >::size | ( | ) | const [virtual] |
Implements QwtSeriesData< T >.
QRectF QwtSeriesData< T >::d_boundingRect [mutable, protected, inherited] |
Can be used to cache a calculated bounding rectangle.
QVector<T> QwtArraySeriesData< T >::d_samples [protected] |
Vector of samples.