10 #ifndef QWT_SERIES_DATA_H
11 #define QWT_SERIES_DATA_H
13 #include "qwt_global.h"
14 #include "qwt_samples.h"
15 #include "qwt_point_3d.h"
48 template<
typename T >
58 #ifndef QWT_PYTHON_WRAPPER
61 virtual size_t size()
const = 0;
68 virtual T
sample(
size_t i )
const = 0;
86 virtual size_t size()
const {
return 0; }
87 virtual T
sample(
size_t i )
const {
return T(); }
112 template<
typename T >
114 : cachedBoundingRect( 0.0, 0.0, -1.0, -1.0 )
118 template<
typename T >
123 template<
typename T >
134 template<
typename T >
157 virtual size_t size() const QWT_OVERRIDE;
165 virtual T
sample(
size_t index ) const QWT_OVERRIDE;
172 template< typename T >
177 template<
typename T >
183 template<
typename T >
190 template<
typename T >
196 template<
typename T >
199 return m_samples.size();
202 template<
typename T >
205 return m_samples[
static_cast< int >( i ) ];
270 QWT_EXPORT QRectF qwtBoundingRect(
273 QWT_EXPORT QRectF qwtBoundingRect(
276 QWT_EXPORT QRectF qwtBoundingRect(
279 QWT_EXPORT QRectF qwtBoundingRect(
282 QWT_EXPORT QRectF qwtBoundingRect(
285 QWT_EXPORT QRectF qwtBoundingRect(
288 QWT_EXPORT QRectF qwtBoundingRect(
346 template<
typename T,
typename LessThan >
348 double value, LessThan lessThan )
350 const int indexMax = series.
size() - 1;
352 if ( indexMax < 0 || !lessThan( value, series.
sample( indexMax ) ) )
360 const int half = n >> 1;
361 const int indexMid = indexMin + half;
363 if ( lessThan( value, series.
sample( indexMid ) ) )
369 indexMin = indexMid + 1;
Template class for data, that is organized as QVector.
virtual T sample(size_t index) const override
virtual size_t size() const override
QwtArraySeriesData()
Constructor.
void setSamples(const QVector< T > &samples)
QwtArraySeriesData(const QVector< T > &samples)
QVector< T > m_samples
Vector of samples.
const QVector< T > samples() const
Interface for iterating over an array of intervals.
Interface for iterating over an array of 3D points.
A point in polar coordinates.
Interface for iterating over an array of points.
Abstract interface for iterating over samples.
virtual void setRectOfInterest(const QRectF &rect)
virtual size_t size() const =0
QwtSeriesData()
Constructor.
virtual ~QwtSeriesData()
Destructor.
QRectF cachedBoundingRect
Can be used to cache a calculated bounding rectangle.
virtual T sample(size_t i) const =0
virtual QRectF boundingRect() const =0
Interface for iterating over an array of samples.
Interface for iterating over an array of vector field samples.