27#ifndef QWT_POINT_DATA_H
28#define QWT_POINT_DATA_H
30#include "qwtcore_global.h"
31#include "qwt_series_data.h"
50 virtual size_t size()
const override;
52 virtual QPointF
sample(
size_t index)
const override;
75 virtual size_t size()
const override;
77 virtual QPointF
sample(
size_t index)
const override;
80 const T*
xData()
const;
82 const T*
yData()
const;
106 virtual size_t size()
const override;
108 virtual QPointF
sample(
size_t index)
const override;
123template<
typename T >
131 virtual size_t size()
const override;
133 virtual QPointF
sample(
size_t index)
const override;
136 const T*
yData()
const;
203 void setSize(
size_t size);
205 virtual size_t size()
const override;
215 virtual QPointF
sample(
size_t index)
const override;
218 virtual double y(
double x)
const = 0;
220 virtual double x(
size_t index)
const;
225 QRectF rectOfInterest()
const;
230 QRectF m_rectOfInterest;
235template<
typename T >
241template<
typename T >
249template<
typename T >
253 std::memcpy(m_x.data(), x, size *
sizeof(T));
256 std::memcpy(m_y.data(), y, size *
sizeof(T));
260template<
typename T >
263 return qMin(m_x.size(), m_y.size());
267template<
typename T >
270 return QPointF(m_x[
int(index) ], m_y[
int(index) ]);
274template<
typename T >
281template<
typename T >
288template<
typename T >
294template<
typename T >
298 std::memcpy(m_y.data(), y, size *
sizeof(T));
302template<
typename T >
309template<
typename T >
312 return QPointF(index, m_y[
int(index) ]);
316template<
typename T >
323template<
typename T >
329template<
typename T >
336template<
typename T >
339 return QPointF(m_x[
int(index) ], m_y[
int(index) ]);
343template<
typename T >
350template<
typename T >
357template<
typename T >
363template<
typename T >
370template<
typename T >
373 return QPointF(index, m_y[
int(index) ]);
377template<
typename T >
Definition qwt_clipper.h:41
virtual QPointF sample(size_t index) const override
Definition qwt_series_data.h:225
virtual size_t size() const override
Definition qwt_series_data.h:219
Data class containing two pointers to memory blocks of T.
Definition qwt_point_data.h:69
const T * xData() const
Get the x-data pointer
Definition qwt_point_data.h:344
const T * yData() const
Get the y-data pointer
Definition qwt_point_data.h:351
virtual size_t size() const override
Get the size of the data set
Definition qwt_point_data.h:330
virtual QPointF sample(size_t index) const override
Get the sample at a specific index
Definition qwt_point_data.h:337
QwtCPointerData(const T *x, const T *y, size_t size)
Constructor with C-style arrays
Definition qwt_point_data.h:324
Data class containing a pointer to memory of y coordinates
Definition qwt_point_data.h:125
QwtCPointerValueData(const T *y, size_t size)
Constructor with C-style array
Definition qwt_point_data.h:358
virtual size_t size() const override
Get the size of the data set
Definition qwt_point_data.h:364
const T * yData() const
Get the y-data pointer
Definition qwt_point_data.h:378
virtual QPointF sample(size_t index) const override
Get the sample at a specific index
Definition qwt_point_data.h:371
A class representing an interval
Definition qwt_interval.h:39
Interface for iterating over two QVector<T> objects.
Definition qwt_point_data.h:40
virtual QPointF sample(size_t index) const override
Get the sample at a specific index
Definition qwt_point_data.h:268
const QVector< T > & xData() const
Get the x-data vector
Definition qwt_point_data.h:275
const QVector< T > & yData() const
Get the y-data vector
Definition qwt_point_data.h:282
QwtPointArrayData(const QVector< T > &x, const QVector< T > &y)
Constructor with QVector references
Definition qwt_point_data.h:236
virtual size_t size() const override
Get the size of the data set
Definition qwt_point_data.h:261
Interface for iterating over an array of points
Definition qwt_series_data.h:235
virtual QRectF boundingRect() const override
Calculate the bounding rectangle
Definition qwt_series_data.cpp:415
virtual void setRectOfInterest(const QRectF &rect)
Set a the "rect of interest"
Definition qwt_series_data.h:145
Synthetic point data
Definition qwt_point_data.h:197
Interface for iterating over a QVector<T>.
Definition qwt_point_data.h:98
QwtValuePointData(const QVector< T > &y)
Constructor with QVector reference
Definition qwt_point_data.h:289
virtual size_t size() const override
Get the size of the data set
Definition qwt_point_data.h:303
virtual QPointF sample(size_t index) const override
Get the sample at a specific index
Definition qwt_point_data.h:310
const QVector< T > & yData() const
Get the y-data vector
Definition qwt_point_data.h:317