@@ -92,6 +92,8 QChart::~QChart() | |||||
92 | Adds the \a series and optional \a axisY onto the chart and takes the ownership of the objects. |
|
92 | Adds the \a series and optional \a axisY onto the chart and takes the ownership of the objects. | |
93 | If auto scaling is enabled, re-scales the axes the series is bound to (both the x axis and |
|
93 | If auto scaling is enabled, re-scales the axes the series is bound to (both the x axis and | |
94 | the y axis). |
|
94 | the y axis). | |
|
95 | ||||
|
96 | \sa removeSeries(), removeAllSeries() | |||
95 | */ |
|
97 | */ | |
96 | void QChart::addSeries(QAbstractSeries *series, QAxis *axisY) |
|
98 | void QChart::addSeries(QAbstractSeries *series, QAxis *axisY) | |
97 | { |
|
99 | { | |
@@ -439,6 +441,11 bool QChart::isBackgroundDropShadowEnabled() const | |||||
439 | return d_ptr->m_presenter->m_backgroundItem->isDropShadowEnabled(); |
|
441 | return d_ptr->m_presenter->m_backgroundItem->isDropShadowEnabled(); | |
440 | } |
|
442 | } | |
441 |
|
443 | |||
|
444 | /*! | |||
|
445 | Returns all the series that are added to the chart. | |||
|
446 | ||||
|
447 | \sa addSeries(), removeSeries(), removeAllSeries() | |||
|
448 | */ | |||
442 | QList<QAbstractSeries*> QChart::series() const |
|
449 | QList<QAbstractSeries*> QChart::series() const | |
443 | { |
|
450 | { | |
444 | return d_ptr->m_dataset->series(); |
|
451 | return d_ptr->m_dataset->series(); |
@@ -204,11 +204,15 void tst_QChart::addSeries() | |||||
204 | QTest::qWaitForWindowShown(m_view); |
|
204 | QTest::qWaitForWindowShown(m_view); | |
205 | if(!axis) axis = m_chart->axisY(); |
|
205 | if(!axis) axis = m_chart->axisY(); | |
206 | QVERIFY(!series->chart()); |
|
206 | QVERIFY(!series->chart()); | |
|
207 | QCOMPARE(m_chart->series().count(), 0); | |||
207 | m_chart->addSeries(series,axis); |
|
208 | m_chart->addSeries(series,axis); | |
|
209 | QCOMPARE(m_chart->series().count(), 1); | |||
|
210 | QCOMPARE(m_chart->series().first(), series); | |||
208 | QVERIFY(series->chart() == m_chart); |
|
211 | QVERIFY(series->chart() == m_chart); | |
209 | QCOMPARE(m_chart->axisY(series),axis); |
|
212 | QCOMPARE(m_chart->axisY(series),axis); | |
210 | m_chart->removeSeries(series); |
|
213 | m_chart->removeSeries(series); | |
211 | QVERIFY(!series->chart()); |
|
214 | QVERIFY(!series->chart()); | |
|
215 | QCOMPARE(m_chart->series().count(), 0); | |||
212 | } |
|
216 | } | |
213 |
|
217 | |||
214 | void tst_QChart::animationOptions_data() |
|
218 | void tst_QChart::animationOptions_data() |
General Comments 0
You need to be logged in to leave comments.
Login now