Go to the documentation of this file.
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;
72 virtual size_t size()
const {
return 0; }
73 virtual T
sample(
size_t i )
const {
return T(); }
117 template<
typename T >
119 : cachedBoundingRect( 0.0, 0.0, -1.0, -1.0 )
123 template<
typename T >
128 template<
typename T >
139 template<
typename T >
177 template<
typename T >
182 template<
typename T >
184 : m_samples( samples )
188 template<
typename T >
195 template<
typename T >
201 template<
typename T >
204 return m_samples.size();
207 template<
typename T >
210 return m_samples[
static_cast< int >( i ) ];
307 template<
typename T,
typename LessThan >
309 double value, LessThan lessThan )
311 const int indexMax = series.
size() - 1;
313 if ( indexMax < 0 || !lessThan( value, series.
sample( indexMax ) ) )
321 const int half = n >> 1;
322 const int indexMid = indexMin + half;
324 if ( lessThan( value, series.
sample( indexMid ) ) )
330 indexMin = indexMid + 1;
QVector< T > m_samples
Vector of samples.
QwtArraySeriesData< QwtVectorFieldSample > QwtVectorFieldData
Interface for iterating over an array of vector field samples.
QwtArraySeriesData< QwtIntervalSample > QwtIntervalSeriesData
Interface for iterating over an array of intervals.
QwtArraySeriesData()
Constructor.
QwtArraySeriesData< QwtSetSample > QwtSetSeriesData
Interface for iterating over an array of samples.
QwtArraySeriesData< QwtOHLCSample > QwtTradingChartData
Interface for iterating over an array of OHLC samples.
virtual size_t size() const QWT_OVERRIDE
A point in polar coordinates.
virtual T sample(size_t index) const QWT_OVERRIDE
void setSamples(const QVector< T > &samples)
QwtSeriesData()
Constructor.
const QVector< T > samples() const
virtual QRectF boundingRect() const
Abstract interface for iterating over samples.
virtual T sample(size_t i) const =0
QwtSeriesData< T > & operator=(const QwtSeriesData< T > &)
int qwtUpperSampleIndex(const QwtSeriesData< T > &series, double value, LessThan lessThan)
QRectF cachedBoundingRect
Can be used to cache a calculated bounding rectangle.
Template class for data, that is organized as QVector.
virtual ~QwtSeriesData()
Destructor.
QwtArraySeriesData< QwtPoint3D > QwtPoint3DSeriesData
Interface for iterating over an array of 3D points.
virtual size_t size() const =0
virtual void setRectOfInterest(const QRectF &rect)
QWT_EXPORT QRectF qwtBoundingRect(const QwtSeriesData< QPointF > &, int from=0, int to=-1)
Calculate the bounding rectangle of a series subset.
QwtArraySeriesData< QPointF > QwtPointSeriesData
Interface for iterating over an array of points.
plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:46