Qwt User's Guide 6.3.0
Loading...
Searching...
No Matches
QwtCPointerValueData< T > Class Template Reference

Data class containing a pointer to memory of y coordinates. More...

#include <qwt_point_data.h>

Inheritance diagram for QwtCPointerValueData< T >:

Public Member Functions

 QwtCPointerValueData (const T *y, size_t size)
 
virtual size_t size () const override
 
virtual QPointF sample (size_t index) const override
 
const T * yData () const
 
- Public Member Functions inherited from QwtSeriesData< QPointF >
 QwtSeriesData ()
 Constructor.
 
virtual ~QwtSeriesData ()
 Destructor.
 
QPointF firstSample () const
 
QPointF lastSample () const
 
virtual QRectF boundingRect () const
 
virtual void setRectOfInterest (const QRectF &rect)
 

Additional Inherited Members

- Protected Attributes inherited from QwtSeriesData< QPointF >
QRectF cachedBoundingRect
 Can be used to cache a calculated bounding rectangle.
 

Detailed Description

template<typename T>
class QwtCPointerValueData< T >

Data class containing a pointer to memory of y coordinates.

The memory contains the y coordinates, while the index is interpreted as x coordinate.

Definition at line 89 of file qwt_point_data.h.

Constructor & Destructor Documentation

◆ QwtCPointerValueData()

template<typename T >
QwtCPointerValueData< T >::QwtCPointerValueData ( const T * y,
size_t size )

Constructor

Parameters
yArray of y values
sizeSize of the x and y arrays
Warning
The programmer must assure that the memory blocks referenced by the pointers remain valid during the lifetime of the QwtCPointerValueData object.
See also
QwtPlotCurve::setData(), QwtPlotCurve::setRawSamples()

Definition at line 380 of file qwt_point_data.h.

Member Function Documentation

◆ sample()

template<typename T >
QPointF QwtCPointerValueData< T >::sample ( size_t index) const
overridevirtual

Return the sample at position i

Parameters
indexIndex
Returns
Sample at position i

Implements QwtSeriesData< QPointF >.

Definition at line 400 of file qwt_point_data.h.

◆ size()

template<typename T >
size_t QwtCPointerValueData< T >::size ( ) const
overridevirtual
Returns
Size of the data set

Implements QwtSeriesData< QPointF >.

Definition at line 388 of file qwt_point_data.h.

◆ yData()

template<typename T >
const T * QwtCPointerValueData< T >::yData ( ) const
Returns
Array of the y-values

Definition at line 407 of file qwt_point_data.h.