10 #ifndef QWT_SERIES_DATA_H 11 #define QWT_SERIES_DATA_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 >
118 template<
typename T >
123 template<
typename T >
134 template<
typename T >
172 template<
typename T >
177 template<
typename T >
179 : m_samples( samples )
183 template<
typename T >
190 template<
typename T >
196 template<
typename T >
202 template<
typename T >
205 return m_samples[
static_cast< int >( i ) ];
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;
virtual void setRectOfInterest(const QRectF &rect)
A point in polar coordinates.
QwtSeriesData()
Constructor.
QWT_EXPORT QRectF qwtBoundingRect(const QwtSeriesData< QPointF > &, int from=0, int to=-1)
Calculate the bounding rectangle of a series subset.
Interface for iterating over an array of samples.
virtual QRectF boundingRect() const =0
Abstract interface for iterating over samples.
const QVector< T > samples() const
Interface for iterating over an array of 3D points.
QVector< T > m_samples
Vector of samples.
virtual size_t size() const QWT_OVERRIDE
QwtArraySeriesData()
Constructor.
QwtSeriesData< T > & operator=(const QwtSeriesData< T > &)
QRectF cachedBoundingRect
Can be used to cache a calculated bounding rectangle.
virtual ~QwtSeriesData()
Destructor.
virtual T sample(size_t index) const QWT_OVERRIDE
Template class for data, that is organized as QVector.
void setSamples(const QVector< T > &samples)
Interface for iterating over an array of intervals.
virtual size_t size() const =0
virtual T sample(size_t i) const =0
Interface for iterating over an array of vector field samples.
Interface for iterating over an array of points.
int qwtUpperSampleIndex(const QwtSeriesData< T > &series, double value, LessThan lessThan)