27#ifndef QWT_POINT_DATA_H
28#define QWT_POINT_DATA_H
30#include "qwt_global.h"
31#include "qwt_series_data.h"
56 virtual size_t size()
const override;
58 virtual QPointF
sample(
size_t index)
const override;
87 virtual size_t size()
const override;
89 virtual QPointF
sample(
size_t index)
const override;
92 const T*
xData()
const;
94 const T*
yData()
const;
116template<
typename T >
126 virtual size_t size()
const override;
128 virtual QPointF
sample(
size_t index)
const override;
151template<
typename T >
159 virtual size_t size()
const override;
161 virtual QPointF
sample(
size_t index)
const override;
164 const T*
yData()
const;
285 void setSize(
size_t size);
287 virtual size_t size()
const override;
297 virtual QPointF
sample(
size_t index)
const override;
314 virtual double y(
double x)
const = 0;
316 virtual double x(
size_t index)
const;
321 QRectF rectOfInterest()
const;
326 QRectF m_rectOfInterest;
331template<
typename T >
337template<
typename T >
345template<
typename T >
349 std::memcpy(m_x.data(), x, size *
sizeof(T));
352 std::memcpy(m_y.data(), y, size *
sizeof(T));
356template<
typename T >
359 return qMin(m_x.size(), m_y.size());
363template<
typename T >
366 return QPointF(m_x[
int(index) ], m_y[
int(index) ]);
370template<
typename T >
377template<
typename T >
384template<
typename T >
390template<
typename T >
394 std::memcpy(m_y.data(), y, size *
sizeof(T));
398template<
typename T >
405template<
typename T >
408 return QPointF(index, m_y[
int(index) ]);
412template<
typename T >
419template<
typename T >
425template<
typename T >
432template<
typename T >
435 return QPointF(m_x[
int(index) ], m_y[
int(index) ]);
439template<
typename T >
446template<
typename T >
453template<
typename T >
459template<
typename T >
466template<
typename T >
469 return QPointF(index, m_y[
int(index) ]);
473template<
typename T >
Definition qwt_clipper.h:40
virtual QPointF sample(size_t index) const override
Definition qwt_series_data.h:215
virtual size_t size() const override
Definition qwt_series_data.h:209
Data class containing two pointers to memory blocks of T. .
Definition qwt_point_data.h:81
const T * xData() const
Get the x-data pointer.
Definition qwt_point_data.h:440
const T * yData() const
Get the y-data pointer.
Definition qwt_point_data.h:447
virtual size_t size() const override
Get the size of the data set.
Definition qwt_point_data.h:426
virtual QPointF sample(size_t index) const override
Get the sample at a specific index.
Definition qwt_point_data.h:433
QwtCPointerData(const T *x, const T *y, size_t size)
Constructor with C-style arrays.
Definition qwt_point_data.h:420
Data class containing a pointer to memory of y coordinates.
Definition qwt_point_data.h:153
QwtCPointerValueData(const T *y, size_t size)
Constructor with C-style array.
Definition qwt_point_data.h:454
virtual size_t size() const override
Get the size of the data set.
Definition qwt_point_data.h:460
const T * yData() const
Get the y-data pointer.
Definition qwt_point_data.h:474
virtual QPointF sample(size_t index) const override
Get the sample at a specific index.
Definition qwt_point_data.h:467
A class representing an interval.
Definition qwt_interval.h:45
Interface for iterating over two QVector<T> objects. .
Definition qwt_point_data.h:46
virtual QPointF sample(size_t index) const override
Get the sample at a specific index.
Definition qwt_point_data.h:364
const QVector< T > & xData() const
Get the x-data vector.
Definition qwt_point_data.h:371
const QVector< T > & yData() const
Get the y-data vector.
Definition qwt_point_data.h:378
QwtPointArrayData(const QVector< T > &x, const QVector< T > &y)
Constructor with QVector references.
Definition qwt_point_data.h:332
virtual size_t size() const override
Get the size of the data set.
Definition qwt_point_data.h:357
Interface for iterating over an array of points.
Definition qwt_series_data.h:231
virtual QRectF boundingRect() const override
Calculate the bounding rectangle.
Definition qwt_series_data.cpp:530
virtual void setRectOfInterest(const QRectF &rect)
Set a the "rect of interest".
Definition qwt_series_data.h:129
Synthetic point data.
Definition qwt_point_data.h:279
virtual double y(double x) const =0
Calculate a y value for a x value.
Interface for iterating over a QVector<T>.
Definition qwt_point_data.h:118
QwtValuePointData(const QVector< T > &y)
Constructor with QVector reference.
Definition qwt_point_data.h:385
virtual size_t size() const override
Get the size of the data set.
Definition qwt_point_data.h:399
virtual QPointF sample(size_t index) const override
Get the sample at a specific index.
Definition qwt_point_data.h:406
const QVector< T > & yData() const
Get the y-data vector.
Definition qwt_point_data.h:413