@@ -294,8 +294,22 void MainWidget::handleMarkerClicked() | |||
|
294 | 294 | |
|
295 | 295 | qDebug() << "marker clicked:" << marker; |
|
296 | 296 | |
|
297 | QPieSlice* slice = qobject_cast<QPieSlice*> (marker->peerObject()); | |
|
298 | Q_ASSERT(slice); | |
|
297 | switch (marker->series()->type()) | |
|
298 | { | |
|
299 | case QAbstractSeries::SeriesTypePie: | |
|
300 | { | |
|
301 | // Series type is pie. | |
|
302 | // The peer object is QPieSlice | |
|
303 | QPieSlice* slice = qobject_cast<QPieSlice*> (marker->peerObject()); | |
|
304 | Q_ASSERT(slice); | |
|
305 | slice->setExploded(!slice->isExploded()); | |
|
306 | break; | |
|
307 | } | |
|
308 | default: | |
|
309 | { | |
|
310 | qDebug() << "Unknown series type"; | |
|
311 | break; | |
|
312 | } | |
|
313 | } | |
|
299 | 314 | |
|
300 | slice->setExploded(!slice->isExploded()); | |
|
301 | 315 | } |
General Comments 0
You need to be logged in to leave comments.
Login now