Qwt User's Guide  6.1.6
QwtSeriesStore< T > Class Template Reference

Class storing a QwtSeriesData object. More...

#include <qwt_series_store.h>

Inheritance diagram for QwtSeriesStore< T >:

Public Member Functions

 QwtSeriesStore ()
 Constructor The store contains no series.
 
 ~QwtSeriesStore ()
 Destructor.
 
void setData (QwtSeriesData< T > *series)
 
QwtSeriesData< T > * data ()
 
const QwtSeriesData< T > * data () const
 
sample (int index) const
 
virtual size_t dataSize () const
 
virtual QRectF dataRect () const
 
virtual void setRectOfInterest (const QRectF &rect)
 
QwtSeriesData< T > * swapData (QwtSeriesData< T > *series)
 

Additional Inherited Members

- Protected Member Functions inherited from QwtAbstractSeriesStore
virtual ~QwtAbstractSeriesStore ()
 Destructor.
 
virtual void dataChanged ()=0
 dataChanged() indicates, that the series has been changed.
 

Detailed Description

template<typename T>
class QwtSeriesStore< T >

Class storing a QwtSeriesData object.

QwtSeriesStore and QwtPlotSeriesItem are intended as base classes for all plot items iterating over a series of samples. Both classes share a virtual base class ( QwtAbstractSeriesStore ) to bridge between them.

QwtSeriesStore offers the template based part for the plot item API, so that QwtPlotSeriesItem can be derived without any hassle with templates.

Member Function Documentation

◆ data() [1/2]

template<typename T >
QwtSeriesData< T > * QwtSeriesStore< T >::data
inline
Returns
the the series data

◆ data() [2/2]

template<typename T >
const QwtSeriesData< T > * QwtSeriesStore< T >::data
inline
Returns
the the series data

◆ dataRect()

template<typename T >
QRectF QwtSeriesStore< T >::dataRect
virtual
Returns
Bounding rectangle of the series or an invalid rectangle, when no series is stored
See also
QwtSeriesData<T>::boundingRect()

Implements QwtAbstractSeriesStore.

◆ dataSize()

template<typename T >
size_t QwtSeriesStore< T >::dataSize
virtual
Returns
Number of samples of the series
See also
setData(), QwtSeriesData<T>::size()

Implements QwtAbstractSeriesStore.

◆ sample()

template<typename T >
T QwtSeriesStore< T >::sample ( int  index) const
inline
Parameters
indexIndex
Returns
Sample at position index

◆ setData()

template<typename T >
void QwtSeriesStore< T >::setData ( QwtSeriesData< T > *  series)

Assign a series of samples

Parameters
seriesData
Warning
The item takes ownership of the data object, deleting it when its not used anymore.

◆ setRectOfInterest()

template<typename T >
void QwtSeriesStore< T >::setRectOfInterest ( const QRectF &  rect)
virtual

Set a the "rect of interest" for the series

Parameters
rectRectangle of interest
See also
QwtSeriesData<T>::setRectOfInterest()

Implements QwtAbstractSeriesStore.

◆ swapData()

template<typename T >
QwtSeriesData< T > * QwtSeriesStore< T >::swapData ( QwtSeriesData< T > *  series)

Replace a series without deleting the previous one

Parameters
seriesNew series
Returns
Previously assigned series