diff --git a/doc/src/examples-donut.qdoc b/doc/src/demos-nesteddonuts.qdoc similarity index 80% rename from doc/src/examples-donut.qdoc rename to doc/src/demos-nesteddonuts.qdoc index fde288d..e4ddcf5 100644 --- a/doc/src/examples-donut.qdoc +++ b/doc/src/demos-nesteddonuts.qdoc @@ -1,6 +1,6 @@ /*! - \example examples/donut - \title Donut example + \example demos/nesteddonuts + \title Nested donuts demo \subtitle This example shows how to use create a nested donuts chart using QPieSeries API. @@ -8,12 +8,12 @@ Let's start by creating a QChartView instance and enabling the Antialiasing on it. Last line enables the animations of the chart. - \snippet ../examples/donut/widget.cpp 1 + \snippet ../demos/nesteddonuts/widget.cpp 1 Three variables are defined that will be used to define the donut chart. Min and max size define the relative size of the whole donut. minSize is the relative inner size of the smallest donut. maxSize is the relative outer size of the biggest donut. - \snippet ../examples/donut/widget.cpp 2 + \snippet ../demos/nesteddonuts/widget.cpp 2 Following block of code defines the individual donuts and their slices. First new QPieSeries object is created. Callign setDonut() changes pie into a donut. The number of slices in each donut is randomized. @@ -23,20 +23,20 @@ Finally the slice is added to the donut. The donut's size is adjusted to achive the nesting of the donuts. Then the donut is added to the widget's list of donuts and to the chart. - \snippet ../examples/donut/widget.cpp 3 + \snippet ../demos/nesteddonuts/widget.cpp 3 Finally the widget is placed in a layout used by the application. - \snippet ../examples/donut/widget.cpp 4 + \snippet ../demos/nesteddonuts/widget.cpp 4 To make the example more interesting the donuts are rotated randomly every 1.25 sec. - \snippet ../examples/donut/widget.cpp 5 + \snippet ../demos/nesteddonuts/widget.cpp 5 The widget's updatedRotation slot is defined below. It goes through all of the donuts and modifies thier current rotation by a random value. - \snippet ../examples/donut/widget.cpp 6 + \snippet ../demos/nesteddonuts/widget.cpp 6 The earlier mentioned explodeSlice slot code is provided below. If the slice is set to exploded then stop the timer that controls the donuts rotation. @@ -45,5 +45,5 @@ have their start and end angles modified so that they wouldn't "block" the way for the hightlighted slice. If the slice is no longer selected return to the original state. - \snippet ../examples/donut/widget.cpp 7 + \snippet ../demos/nesteddonuts/widget.cpp 7 */ diff --git a/doc/src/demos.qdoc b/doc/src/demos.qdoc index 9723b0a..847041a 100644 --- a/doc/src/demos.qdoc +++ b/doc/src/demos.qdoc @@ -16,6 +16,7 @@