QWT 7.0.1
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
QwtSeriesData< T > Class Template Referenceabstract

Abstract interface for iterating over samples. More...

#include <qwt_series_data.h>

Inheritance diagram for QwtSeriesData< T >:
QwtArraySeriesData< QwtIntervalSample > QwtArraySeriesData< QwtPoint3D > QwtArraySeriesData< QPointF > QwtArraySeriesData< QwtSetSample > QwtArraySeriesData< QwtOHLCSample > QwtArraySeriesData< QwtVectorFieldSample > QwtArraySeriesData< T > QwtIntervalSeriesData QwtPoint3DSeriesData QwtPointSeriesData QwtSetSeriesData QwtTradingChartData QwtVectorFieldData QwtCPointerData< T > QwtCPointerValueData< T > QwtPointArrayData< T > QwtSyntheticPointData QwtValuePointData< T >

Public Member Functions

 QwtSeriesData ()
 Constructor.
 
virtual ~QwtSeriesData ()
 Destructor.
 
virtual size_t size () const =0
 
virtual T sample (size_t i) const =0
 Return a sample.
 
virtual QRectF boundingRect () const =0
 Calculate the bounding rect of all samples.
 
virtual void setRectOfInterest (const QRectF &rect)
 Set a the "rect of interest".
 

Protected Attributes

QRectF cachedBoundingRect
 Can be used to cache a calculated bounding rectangle.
 

Detailed Description

template<typename T>
class 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:

Member Function Documentation

◆ boundingRect()

template<typename T >
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 rectangle.

Returns
Bounding rectangle

Implemented in QwtSyntheticPointData, QwtPointSeriesData, QwtPoint3DSeriesData, QwtIntervalSeriesData, QwtSetSeriesData, QwtVectorFieldData, and QwtTradingChartData.

◆ sample()

template<typename T >
virtual T QwtSeriesData< T >::sample ( size_t  i) const
pure virtual

◆ setRectOfInterest()

template<typename T >
void QwtSeriesData< T >::setRectOfInterest ( const QRectF &  rect)
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.

Parameters
rectRectangle of interest

Reimplemented in QwtSyntheticPointData.

◆ size()

template<typename T >
virtual size_t QwtSeriesData< T >::size ( ) const
pure virtual

The documentation for this class was generated from the following files: