@@ -25,6 +25,11 int main(int argc, char *argv[]) | |||||
25 | chartView->addSeries(series); |
|
25 | chartView->addSeries(series); | |
26 | //! [1] |
|
26 | //! [1] | |
27 |
|
27 | |||
|
28 | //! [2] | |||
|
29 | series->enableHoverHighlight(true); | |||
|
30 | series->enableClickExplodes(true); | |||
|
31 | //! [2] | |||
|
32 | ||||
28 | window.setCentralWidget(chartView); |
|
33 | window.setCentralWidget(chartView); | |
29 | window.resize(600, 600); |
|
34 | window.resize(600, 600); | |
30 | window.show(); |
|
35 | window.show(); |
@@ -116,6 +116,11 bool QPieSeries::ChangeSet::isEmpty() const | |||||
116 |
|
116 | |||
117 | Example on how to create a chart with pie series: |
|
117 | Example on how to create a chart with pie series: | |
118 | \snippet ../example/piechart/main.cpp 1 |
|
118 | \snippet ../example/piechart/main.cpp 1 | |
|
119 | ||||
|
120 | To help with the most common user intercation scenarions there some convenience functions. Specifically | |||
|
121 | exploding and higlighting: | |||
|
122 | \snippet ../example/piechart/main.cpp 2 | |||
|
123 | ||||
119 | */ |
|
124 | */ | |
120 |
|
125 | |||
121 | /*! |
|
126 | /*! | |
@@ -172,7 +177,7 void QPieSeries::set(QList<QPieSlice*> slices) | |||||
172 | } |
|
177 | } | |
173 |
|
178 | |||
174 | /*! |
|
179 | /*! | |
175 | Adds an array of slices to the series. |
|
180 | Adds an array of \a slices to the series. | |
176 | Slice ownership is passed to the series. |
|
181 | Slice ownership is passed to the series. | |
177 | */ |
|
182 | */ | |
178 | void QPieSeries::add(QList<QPieSlice*> slices) |
|
183 | void QPieSeries::add(QList<QPieSlice*> slices) | |
@@ -350,7 +355,7 void QPieSeries::setLabelsVisible(bool visible) | |||||
350 | /*! |
|
355 | /*! | |
351 | Convenience method for exploding a slice when user clicks the pie. |
|
356 | Convenience method for exploding a slice when user clicks the pie. | |
352 |
|
357 | |||
353 | \sa QPieSlice::isExploded(), QPieSlice::setExploded() |
|
358 | \sa QPieSlice::isExploded(), QPieSlice::setExploded(), QPieSlice::setExplodeDistance() | |
354 | */ |
|
359 | */ | |
355 | void QPieSeries::enableClickExplodes(bool enable) |
|
360 | void QPieSeries::enableClickExplodes(bool enable) | |
356 | { |
|
361 | { |
General Comments 0
You need to be logged in to leave comments.
Login now