@@ -278,6 +278,7 void tst_qpieseries::clickedSignal() | |||||
278 |
|
278 | |||
279 | // add series to the chart |
|
279 | // add series to the chart | |
280 | QChartView view(new QChart()); |
|
280 | QChartView view(new QChart()); | |
|
281 | view.chart()->legend()->setVisible(false); | |||
281 | view.resize(200, 200); |
|
282 | view.resize(200, 200); | |
282 | view.chart()->addSeries(series); |
|
283 | view.chart()->addSeries(series); | |
283 | view.show(); |
|
284 | view.show(); | |
@@ -285,7 +286,7 void tst_qpieseries::clickedSignal() | |||||
285 |
|
286 | |||
286 | // simulate clicks |
|
287 | // simulate clicks | |
287 | // pie rectangle: QRectF(60,60 121x121) |
|
288 | // pie rectangle: QRectF(60,60 121x121) | |
288 |
QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, QPoint(1 |
|
289 | QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, QPoint(146, 90)); // inside slice 1 | |
289 | TRY_COMPARE(clickSpy1.count(), 1); |
|
290 | TRY_COMPARE(clickSpy1.count(), 1); | |
290 | QCOMPARE(qvariant_cast<QPieSlice*>(clickSpy1.at(0).at(0)), s1); |
|
291 | QCOMPARE(qvariant_cast<QPieSlice*>(clickSpy1.at(0).at(0)), s1); | |
291 | } |
|
292 | } | |
@@ -301,6 +302,7 void tst_qpieseries::hoverSignal() | |||||
301 |
|
302 | |||
302 | // add series to the chart |
|
303 | // add series to the chart | |
303 | QChartView view(new QChart()); |
|
304 | QChartView view(new QChart()); | |
|
305 | view.chart()->legend()->setVisible(false); | |||
304 | view.resize(200, 200); |
|
306 | view.resize(200, 200); | |
305 | view.chart()->addSeries(series); |
|
307 | view.chart()->addSeries(series); | |
306 | view.show(); |
|
308 | view.show(); |
@@ -207,6 +207,7 void tst_qpieslice::mouseClick() | |||||
207 |
|
207 | |||
208 | // add series to the chart |
|
208 | // add series to the chart | |
209 | QChartView view(new QChart()); |
|
209 | QChartView view(new QChart()); | |
|
210 | view.chart()->legend()->setVisible(false); | |||
210 | view.resize(200, 200); |
|
211 | view.resize(200, 200); | |
211 | view.chart()->addSeries(series); |
|
212 | view.chart()->addSeries(series); | |
212 | view.show(); |
|
213 | view.show(); | |
@@ -236,6 +237,7 void tst_qpieslice::mouseHover() | |||||
236 |
|
237 | |||
237 | // add series to the chart |
|
238 | // add series to the chart | |
238 | QChartView view(new QChart()); |
|
239 | QChartView view(new QChart()); | |
|
240 | view.chart()->legend()->setVisible(false); | |||
239 | view.resize(200, 200); |
|
241 | view.resize(200, 200); | |
240 | view.chart()->addSeries(series); |
|
242 | view.chart()->addSeries(series); | |
241 | view.show(); |
|
243 | view.show(); |
General Comments 0
You need to be logged in to leave comments.
Login now