@@ -49,7 +49,7 public: // from QDeclarativeParserStatus | |||||
49 | public: // from QLineSeries |
|
49 | public: // from QLineSeries | |
50 | Q_INVOKABLE void append(qreal x, qreal y) { QLineSeries::append(x, y); } |
|
50 | Q_INVOKABLE void append(qreal x, qreal y) { QLineSeries::append(x, y); } | |
51 | Q_INVOKABLE void remove(qreal x, qreal y) { QLineSeries::remove(x, y); } |
|
51 | Q_INVOKABLE void remove(qreal x, qreal y) { QLineSeries::remove(x, y); } | |
52 |
Q_INVOKABLE void clear() { QLineSeries:: |
|
52 | Q_INVOKABLE void clear() { QLineSeries::clear(); } | |
53 | Q_INVOKABLE DeclarativeXyPoint *at(int index) { return DeclarativeXySeries::at(index); } |
|
53 | Q_INVOKABLE DeclarativeXyPoint *at(int index) { return DeclarativeXySeries::at(index); } | |
54 |
|
54 | |||
55 | public Q_SLOTS: |
|
55 | public Q_SLOTS: |
@@ -51,7 +51,7 public: // from QDeclarativeParserStatus | |||||
51 | public: // from QScatterSeries |
|
51 | public: // from QScatterSeries | |
52 | Q_INVOKABLE void append(qreal x, qreal y) { QScatterSeries::append(x, y); } |
|
52 | Q_INVOKABLE void append(qreal x, qreal y) { QScatterSeries::append(x, y); } | |
53 | Q_INVOKABLE void remove(qreal x, qreal y) { QScatterSeries::remove(x, y); } |
|
53 | Q_INVOKABLE void remove(qreal x, qreal y) { QScatterSeries::remove(x, y); } | |
54 |
Q_INVOKABLE void clear() { QScatterSeries:: |
|
54 | Q_INVOKABLE void clear() { QScatterSeries::clear(); } | |
55 | Q_INVOKABLE DeclarativeXyPoint *at(int index) { return DeclarativeXySeries::at(index); } |
|
55 | Q_INVOKABLE DeclarativeXyPoint *at(int index) { return DeclarativeXySeries::at(index); } | |
56 |
|
56 | |||
57 | public Q_SLOTS: |
|
57 | public Q_SLOTS: |
@@ -49,7 +49,7 public: // from QDeclarativeParserStatus | |||||
49 | public: // from QSplineSeries |
|
49 | public: // from QSplineSeries | |
50 | Q_INVOKABLE void append(qreal x, qreal y) { QSplineSeries::append(x, y); } |
|
50 | Q_INVOKABLE void append(qreal x, qreal y) { QSplineSeries::append(x, y); } | |
51 | Q_INVOKABLE void remove(qreal x, qreal y) { QSplineSeries::remove(x, y); } |
|
51 | Q_INVOKABLE void remove(qreal x, qreal y) { QSplineSeries::remove(x, y); } | |
52 |
Q_INVOKABLE void clear() { QSplineSeries:: |
|
52 | Q_INVOKABLE void clear() { QSplineSeries::clear(); } | |
53 | Q_INVOKABLE DeclarativeXyPoint *at(int index) { return DeclarativeXySeries::at(index); } |
|
53 | Q_INVOKABLE DeclarativeXyPoint *at(int index) { return DeclarativeXySeries::at(index); } | |
54 |
|
54 | |||
55 | public Q_SLOTS: |
|
55 | public Q_SLOTS: |
@@ -176,17 +176,6 void QXYSeries::remove(const QPointF &point) | |||||
176 | } |
|
176 | } | |
177 |
|
177 | |||
178 | /*! |
|
178 | /*! | |
179 | Removes all data points from the series. |
|
|||
180 | */ |
|
|||
181 | void QXYSeries::removeAll() |
|
|||
182 | { |
|
|||
183 | Q_D(QXYSeries); |
|
|||
184 | foreach(const QPointF& point, d->m_points) { |
|
|||
185 | remove(point); |
|
|||
186 | } |
|
|||
187 | } |
|
|||
188 |
|
||||
189 | /*! |
|
|||
190 | Inserts a \a point in the series at \a index position. |
|
179 | Inserts a \a point in the series at \a index position. | |
191 | */ |
|
180 | */ | |
192 | void QXYSeries::insert(int index, const QPointF &point) |
|
181 | void QXYSeries::insert(int index, const QPointF &point) |
@@ -51,7 +51,6 public: | |||||
51 | void replace(const QPointF &oldPoint,const QPointF &newPoint); |
|
51 | void replace(const QPointF &oldPoint,const QPointF &newPoint); | |
52 | void remove(qreal x, qreal y); |
|
52 | void remove(qreal x, qreal y); | |
53 | void remove(const QPointF &point); |
|
53 | void remove(const QPointF &point); | |
54 | void removeAll(); |
|
|||
55 | void insert(int index, const QPointF &point); |
|
54 | void insert(int index, const QPointF &point); | |
56 | void clear(); |
|
55 | void clear(); | |
57 |
|
56 |
@@ -81,7 +81,7 void tst_QLineSeries::qlineseries() | |||||
81 |
|
81 | |||
82 | series.remove(0.0,0.0); |
|
82 | series.remove(0.0,0.0); | |
83 | series.remove(QPointF()); |
|
83 | series.remove(QPointF()); | |
84 |
series. |
|
84 | series.clear(); | |
85 |
|
85 | |||
86 | series.replace(QPointF(),QPointF()); |
|
86 | series.replace(QPointF(),QPointF()); | |
87 | series.replace(0,0,0,0); |
|
87 | series.replace(0,0,0,0); |
@@ -80,7 +80,7 void tst_QScatterSeries::qscatterseries() | |||||
80 |
|
80 | |||
81 | series.remove(0.0,0.0); |
|
81 | series.remove(0.0,0.0); | |
82 | series.remove(QPointF()); |
|
82 | series.remove(QPointF()); | |
83 |
series. |
|
83 | series.clear(); | |
84 |
|
84 | |||
85 | series.replace(QPointF(),QPointF()); |
|
85 | series.replace(QPointF(),QPointF()); | |
86 | series.replace(0,0,0,0); |
|
86 | series.replace(0,0,0,0); |
@@ -80,7 +80,7 void tst_QSplineSeries::qsplineseries() | |||||
80 |
|
80 | |||
81 | series.remove(0.0,0.0); |
|
81 | series.remove(0.0,0.0); | |
82 | series.remove(QPointF()); |
|
82 | series.remove(QPointF()); | |
83 |
series. |
|
83 | series.clear(); | |
84 |
|
84 | |||
85 | series.replace(QPointF(),QPointF()); |
|
85 | series.replace(QPointF(),QPointF()); | |
86 | series.replace(0,0,0,0); |
|
86 | series.replace(0,0,0,0); |
@@ -184,45 +184,45 void tst_QXYSeries::remove_chart_animation() | |||||
184 | } |
|
184 | } | |
185 |
|
185 | |||
186 |
|
186 | |||
187 |
void tst_QXYSeries:: |
|
187 | void tst_QXYSeries::clear_raw_data() | |
188 | { |
|
188 | { | |
189 | append_data(); |
|
189 | append_data(); | |
190 | } |
|
190 | } | |
191 |
|
191 | |||
192 |
void tst_QXYSeries:: |
|
192 | void tst_QXYSeries::clear_raw() | |
193 | { |
|
193 | { | |
194 | QFETCH(QList<QPointF>, points); |
|
194 | QFETCH(QList<QPointF>, points); | |
195 | QSignalSpy spy0(m_series, SIGNAL(clicked(QPointF const&))); |
|
195 | QSignalSpy spy0(m_series, SIGNAL(clicked(QPointF const&))); | |
196 | m_series->append(points); |
|
196 | m_series->append(points); | |
197 | TRY_COMPARE(spy0.count(), 0); |
|
197 | TRY_COMPARE(spy0.count(), 0); | |
198 | QCOMPARE(m_series->points(), points); |
|
198 | QCOMPARE(m_series->points(), points); | |
199 |
m_series-> |
|
199 | m_series->clear(); | |
200 | TRY_COMPARE(spy0.count(), 0); |
|
200 | TRY_COMPARE(spy0.count(), 0); | |
201 | QCOMPARE(m_series->points().count(), 0); |
|
201 | QCOMPARE(m_series->points().count(), 0); | |
202 | } |
|
202 | } | |
203 |
|
203 | |||
204 |
void tst_QXYSeries:: |
|
204 | void tst_QXYSeries::clear_chart_data() | |
205 | { |
|
205 | { | |
206 | append_data(); |
|
206 | append_data(); | |
207 | } |
|
207 | } | |
208 |
|
208 | |||
209 |
void tst_QXYSeries:: |
|
209 | void tst_QXYSeries::clear_chart() | |
210 | { |
|
210 | { | |
211 | m_view->show(); |
|
211 | m_view->show(); | |
212 | m_chart->addSeries(m_series); |
|
212 | m_chart->addSeries(m_series); | |
213 | QTest::qWaitForWindowShown(m_view); |
|
213 | QTest::qWaitForWindowShown(m_view); | |
214 |
|
|
214 | clear_raw(); | |
215 | } |
|
215 | } | |
216 |
|
216 | |||
217 |
void tst_QXYSeries:: |
|
217 | void tst_QXYSeries::clear_chart_animation_data() | |
218 | { |
|
218 | { | |
219 | append_data(); |
|
219 | append_data(); | |
220 | } |
|
220 | } | |
221 |
|
221 | |||
222 |
void tst_QXYSeries:: |
|
222 | void tst_QXYSeries::clear_chart_animation() | |
223 | { |
|
223 | { | |
224 | m_chart->setAnimationOptions(QChart::AllAnimations); |
|
224 | m_chart->setAnimationOptions(QChart::AllAnimations); | |
225 |
|
|
225 | clear_chart(); | |
226 | } |
|
226 | } | |
227 |
|
227 | |||
228 | void tst_QXYSeries::replace_raw_data() |
|
228 | void tst_QXYSeries::replace_raw_data() |
@@ -62,12 +62,12 private slots: | |||||
62 | void remove_chart(); |
|
62 | void remove_chart(); | |
63 | void remove_chart_animation_data(); |
|
63 | void remove_chart_animation_data(); | |
64 | void remove_chart_animation(); |
|
64 | void remove_chart_animation(); | |
65 |
void |
|
65 | void clear_raw_data(); | |
66 |
void |
|
66 | void clear_raw(); | |
67 |
void |
|
67 | void clear_chart_data(); | |
68 |
void |
|
68 | void clear_chart(); | |
69 |
void |
|
69 | void clear_chart_animation_data(); | |
70 |
void |
|
70 | void clear_chart_animation(); | |
71 | void replace_raw_data(); |
|
71 | void replace_raw_data(); | |
72 | void replace_raw(); |
|
72 | void replace_raw(); | |
73 | void replace_chart_data(); |
|
73 | void replace_chart_data(); |
General Comments 0
You need to be logged in to leave comments.
Login now