10 #ifndef QWT_SERIES_DATA_H 11 #define QWT_SERIES_DATA_H 1 56 #ifndef QWT_PYTHON_WRAPPER 59 virtual size_t size()
const = 0;
66 virtual T
sample(
size_t i )
const = 0;
84 virtual size_t size()
const {
return 0; }
85 virtual T
sample(
size_t i )
const {
return T(); }
110 template <
typename T>
116 template <
typename T>
121 template <
typename T>
132 template <
typename T>
149 void setSamples(
const QVector<T> &samples );
152 const QVector<T> samples()
const;
155 virtual size_t size()
const;
163 virtual T
sample(
size_t index )
const;
170 template <
typename T>
175 template <
typename T>
181 template <
typename T>
188 template <
typename T>
194 template <
typename T>
200 template <
typename T>
203 return d_samples[
static_cast<int>( i ) ];
211 const QVector<QPointF> & = QVector<QPointF>() );
221 const QVector<QwtPoint3D> & = QVector<QwtPoint3D>() );
230 const QVector<QwtIntervalSample> & = QVector<QwtIntervalSample>() );
240 const QVector<QwtSetSample> & = QVector<QwtSetSample>() );
252 const QVector<QwtOHLCSample> & = QVector<QwtOHLCSample>() );
333 template <
typename T,
typename LessThan>
335 double value, LessThan lessThan )
337 const int indexMax = series.
size() - 1;
339 if ( indexMax < 0 || !lessThan( value, series.
sample( indexMax ) ) )
347 const int half = n >> 1;
348 const int indexMid = indexMin + half;
350 if ( lessThan( value, series.
sample( indexMid ) ) )
356 indexMin = indexMid + 1;
virtual void setRectOfInterest(const QRectF &rect)
QwtSeriesData()
Constructor.
QRectF d_boundingRect
Can be used to cache a calculated bounding rectangle.
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
QVector< T > d_samples
Vector of samples.
const QVector< T > samples() const
Abstract interface for iterating over samples.
Interface for iterating over an array of 3D points.
virtual T sample(size_t index) const
virtual size_t size() const
QwtArraySeriesData()
Constructor.
QwtSeriesData< T > & operator=(const QwtSeriesData< T > &)
virtual ~QwtSeriesData()
Destructor.
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 points.
int qwtUpperSampleIndex(const QwtSeriesData< T > &series, double value, LessThan lessThan)