@@ -4,3 +4,10 QSplineSeries::QSplineSeries(QObject *parent) : | |||
|
4 | 4 | QObject(parent) |
|
5 | 5 | { |
|
6 | 6 | } |
|
7 | ||
|
8 | QSplineSeries& QSplineSeries::operator << (const QPointF &value) | |
|
9 | { | |
|
10 | d->m_data.append(value); | |
|
11 | emit changed(); | |
|
12 | return *this; | |
|
13 | } |
@@ -9,13 +9,18 class QSplineSeries : public QChartSeries | |||
|
9 | 9 | { |
|
10 | 10 | Q_OBJECT |
|
11 | 11 | public: |
|
12 | explicit QSplineSeries(QObject *parent = 0); | |
|
13 | ||
|
14 | public: // from QChartSeries | |
|
12 | ||
|
13 | QSplineSeries(QObject *parent = 0); | |
|
15 | 14 | QChartSeriesType type() const { return QChartSeries::SeriesTypeSpline; } |
|
15 | void addData(QPointF value); | |
|
16 | QSplineSeries& operator << (const QPointF &value); | |
|
17 | ||
|
16 | 18 | signals: |
|
17 | 19 | |
|
18 | 20 | public slots: |
|
21 | ||
|
22 | private: | |
|
23 | QList<QPointF> m_data; | |
|
19 | 24 | |
|
20 | 25 | }; |
|
21 | 26 |
General Comments 0
You need to be logged in to leave comments.
Login now