Qwt User's Guide 6.1.3

- Main Page
- Classes

qwt_point_data.h
1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
2 * Qwt Widget Library
3 * Copyright (C) 1997 Josef Wilgen
4 * Copyright (C) 2002 Uwe Rathmann
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the Qwt License, Version 1.0
8 *****************************************************************************/
9
10 #ifndef QWT_POINT_DATA_H
11 #define QWT_POINT_DATA_H 1
12
13 #include "qwt_global.h"
14 #include "qwt_series_data.h"
15
19 class QWT_EXPORT QwtPointArrayData: public QwtSeriesData<QPointF>
20 {
21 public:
22 QwtPointArrayData( const QVector<double> &x, const QVector<double> &y );
23 QwtPointArrayData( const double *x, const double *y, size_t size );
24
25 virtual QRectF boundingRect() const;
26
27 virtual size_t size() const;
28 virtual QPointF sample( size_t i ) const;
29
30 const QVector<double> &xData() const;
31 const QVector<double> &yData() const;
32
33 private:
34 QVector<double> d_x;
35 QVector<double> d_y;
36 };
37
41 class QWT_EXPORT QwtCPointerData: public QwtSeriesData<QPointF>
42 {
43 public:
44 QwtCPointerData( const double *x, const double *y, size_t size );
45
46 virtual QRectF boundingRect() const;
47 virtual size_t size() const;
48 virtual QPointF sample( size_t i ) const;
49
50 const double *xData() const;
51 const double *yData() const;
52
53 private:
54 const double *d_x;
55 const double *d_y;
56 size_t d_size;
57 };
58
112 class QWT_EXPORT QwtSyntheticPointData: public QwtSeriesData<QPointF>
113 {
114 public:
115 QwtSyntheticPointData( size_t size,
116 const QwtInterval & = QwtInterval() );
117
118 void setSize( size_t size );
119 virtual size_t size() const;
120
121 void setInterval( const QwtInterval& );
122 QwtInterval interval() const;
123
124 virtual QRectF boundingRect() const;
125 virtual QPointF sample( size_t i ) const;
126
133 virtual double y( double x ) const = 0;
134 virtual double x( uint index ) const;
135
136 virtual void setRectOfInterest( const QRectF & );
137 QRectF rectOfInterest() const;
138
139 private:
140 size_t d_size;
141 QwtInterval d_interval;
142 QRectF d_rectOfInterest;
143 QwtInterval d_intervalOfInterest;
144 };
145
146 #endif
QwtSeriesData::boundingRect
virtual QRectF boundingRect() const =0
QwtCPointerData
Data class containing two pointers to memory blocks of doubles.
Definition: qwt_point_data.h:41
QwtPointArrayData
Interface for iterating over two QVector<double> objects.
Definition: qwt_point_data.h:19
QwtSeriesData::sample
virtual T sample(size_t i) const =0
QwtSeriesData::setRectOfInterest
virtual void setRectOfInterest(const QRectF &rect)
Definition: qwt_series_data.h:113
QwtSeriesData
Abstract interface for iterating over samples.
Definition: qwt_series_data.h:47
QwtSeriesData::size
virtual size_t size() const =0
QwtInterval
A class representing an interval.
Definition: qwt_interval.h:26
QwtSyntheticPointData
Synthetic point data.
Definition: qwt_point_data.h:112