##// END OF EJS Templates
fixed example paths in doc
sauimone -
r496:c23f1472c851
parent child
Show More
@@ -1,46 +1,46
1 1 include(compat.qdocconf)
2 2 include(macros.qdocconf)
3 3 include(qchart-html-template.qdocconf)
4 4
5 5 project = QtCommercialCharts
6 6 description = Library for creating charts
7 7
8 8 sourcedirs = ../src \
9 ../example \
9 ../examples \
10 10 ./src
11 11 headerdirs = ../src \
12 ../example
12 ../examples
13 13 exampledirs = ../ \
14 14 ../src \
15 ../example
15 ../examples
16 16
17 excludefiles += ../example/linechart/linechart.pro
17 excludefiles += ../examples/linechart/linechart.pro
18 18
19 19 sources.fileextensions = *.cpp *.qdoc *.mm *.qml
20 20 headers.fileextensions = *.h *.ch *.h++ *.hh *.hpp *.hxx
21 21 examples.fileextensions = *.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml
22 22 examples.imageextensions = *.png *.jpeg *.jpg *.gif *.mng
23 23
24 24 imagedirs = ./images
25 25 outputdir = ./html
26 26
27 27
28 28 Cpp.ignoretokens = QTCOMMERCIALCHART_EXPORT \
29 29 QTCOMMERCIALCHART_END_NAMESPACE \
30 30 QTCOMMERCIALCHART_BEGIN_NAMESPACE
31 31 Cpp.ignoredirectives = Q_DECLARE_HANDLE \
32 32 Q_DECLARE_INTERFACE \
33 33 Q_DECLARE_METATYPE \
34 34 Q_DECLARE_OPERATORS_FOR_FLAGS \
35 35 Q_DECLARE_PRIVATE \
36 36 Q_DECLARE_PUBLIC \
37 37 Q_DECLARE_SHARED \
38 38 Q_DECLARE_TR_FUNCTIONS \
39 39 Q_DECLARE_TYPEINFO \
40 40 Q_DISABLE_COPY \
41 41 QT_FORWARD_DECLARE_CLASS \
42 42 Q_DUMMY_COMPARISON_OPERATOR \
43 43 Q_ENUMS \
44 44 Q_FLAGS \
45 45 Q_INTERFACES \
46 46 __attribute__ No newline at end of file
@@ -1,30 +1,30
1 1 /*!
2 2 \example example/areachart
3 3 \title AreaChart Example
4 4 \subtitle
5 5
6 6 The example shows how to create simple area chart.
7 7
8 8 \image areachart.png
9 9
10 10 To create area charts, we need two QLineSeries instances. They are going to define upper and lower boundary of the area.
11 11
12 \snippet ../example/areachart/main.cpp 1
12 \snippet ../examples/areachart/main.cpp 1
13 13
14 14 We add data to both series, we use stream operator.
15 15
16 \snippet ../example/areachart/main.cpp 2
16 \snippet ../examples/areachart/main.cpp 2
17 17
18 18 Now we create QAreaSeries instance using two line series objects. We set the custom gradient fill and width of the outline.
19 19
20 \snippet ../example/areachart/main.cpp 3
20 \snippet ../examples/areachart/main.cpp 3
21 21
22 22 In the end we create QChartView instance, set title, set anti-aliasing and add area series. We also set the specific range for axes.
23 23
24 \snippet ../example/areachart/main.cpp 4
24 \snippet ../examples/areachart/main.cpp 4
25 25
26 26 Chart is ready to be shown.
27 27
28 \snippet ../example/areachart/main.cpp 5
28 \snippet ../examples/areachart/main.cpp 5
29 29
30 30 */ No newline at end of file
@@ -1,26 +1,26
1 1 /*!
2 2 \example example/linechart
3 3 \title LineChart Example
4 4 \subtitle
5 5
6 6 The example shows how to create simple line chart.
7 7
8 8 \image linechart.png
9 9
10 10 To create line charts, QLineSeries instance is needed. Here we create two line series and we set the color and width of line.
11 11
12 \snippet ../example/linechart/main.cpp 1
12 \snippet ../examples/linechart/main.cpp 1
13 13
14 14 We add data to be shown to both series. We can use add() member function or use stream operator.
15 15
16 \snippet ../example/linechart/main.cpp 2
16 \snippet ../examples/linechart/main.cpp 2
17 17
18 18 In the end we create QChartView instance, set title, set anti-aliasing and add both series.
19 19
20 \snippet ../example/linechart/main.cpp 3
20 \snippet ../examples/linechart/main.cpp 3
21 21
22 22 Chart is ready to be shown.
23 23
24 \snippet ../example/linechart/main.cpp 4
24 \snippet ../examples/linechart/main.cpp 4
25 25
26 26 */ No newline at end of file
@@ -1,37 +1,37
1 1 /*!
2 2 \example example/presenterchart
3 3 \title PresenterChart Example
4 4 \subtitle
5 5
6 6 The example shows how to create chart which presents the same set of data as line, scatter and spline charts.
7 7 ChartPresenter will switch between these three chart types every few seconds.
8 8 Please note this example does not use common data model. A use of common data model is documented here.[TODO]
9 9
10 10 \image presenterchart1.png
11 11 \image presenterchart2.png
12 12 \image presenterchart3.png
13 13
14 14 We create simple ChartView class which derives form QChartView.
15 15
16 \snippet ../example/presenterchart/chartview.h 1
16 \snippet ../examples/presenterchart/chartview.h 1
17 17
18 18 Class will implement \c handleTimeout() slot which we are going to use to trigger switching between different chart presentations.
19 19 Class members \c m_series and \c m_titles are going to store series and related titles. In example we are going to present data as a line chart
20 20 using QLineSeries , as scatter chart using QScatterSeries, and as a spline chart using QSplineSeries. We create needed instances in constructor of ChartView class.
21 21 We set custom line and points colors.
22 22
23 \snippet ../example/presenterchart/chartview.cpp 1
23 \snippet ../examples/presenterchart/chartview.cpp 1
24 24
25 25 We add data to all three series. We can use add() member function. If data set is large,it is wiser to use shared data model, as described here.[TODO]
26 26
27 \snippet ../example/presenterchart/chartview.cpp 2
27 \snippet ../examples/presenterchart/chartview.cpp 2
28 28
29 29 In the end we store references all the created series and matching titles.
30 30
31 \snippet ../example/presenterchart/chartview.cpp 3
31 \snippet ../examples/presenterchart/chartview.cpp 3
32 32
33 33 In \c handleTimeout() slot we change currently displayed chart by removing previous series and adding next series from the \c m_series list. We also set proper title.
34 34
35 \snippet ../example/presenterchart/chartview.cpp 4
35 \snippet ../examples/presenterchart/chartview.cpp 4
36 36
37 37 */ No newline at end of file
@@ -1,26 +1,26
1 1 /*!
2 2 \example example/scatterchart
3 3 \title ScatterChart Example
4 4 \subtitle
5 5
6 6 The example shows how to create simple scatter chart.
7 7
8 8 \image scatterchart.png
9 9
10 10 To create scatter charts, QScatterSeries instance is needed. Here we create scatter series instance and we set the type, color and width of outline for scatter points.
11 11
12 \snippet ../example/scatterchart/main.cpp 1
12 \snippet ../examples/scatterchart/main.cpp 1
13 13
14 14 We add data to be shown. We can use add() member function or use stream operator.
15 15
16 \snippet ../example/scatterchart/main.cpp 2
16 \snippet ../examples/scatterchart/main.cpp 2
17 17
18 18 In the end we create QChartView instance, set title, set anti-aliasing and add scatter series.
19 19
20 \snippet ../example/scatterchart/main.cpp 3
20 \snippet ../examples/scatterchart/main.cpp 3
21 21
22 22 Chart is ready to be shown.
23 23
24 \snippet ../example/scatterchart/main.cpp 4
24 \snippet ../examples/scatterchart/main.cpp 4
25 25
26 26 */ No newline at end of file
@@ -1,42 +1,42
1 1 /*!
2 2 \example example/splinechart
3 3 \title SplineChart Example
4 4 \subtitle
5 5
6 6 The example shows how to create simple spline chart.
7 7
8 8 \image splinechart_example
9 9
10 10 To create spline chart we need to put our data into QSplineSeries. QSplineSeries automatically calculates spline segment control points that are needed to properly draw the spline.
11 11
12 \snippet ../example/splinechart/splinewidget.cpp 1
12 \snippet ../examples/splinechart/splinewidget.cpp 1
13 13
14 14 Customize the look of the spline, by setting its pen's color and pen's width
15 15
16 \snippet ../example/splinechart/splinewidget.cpp 2
16 \snippet ../examples/splinechart/splinewidget.cpp 2
17 17
18 18 Now lets add some data points to the series.
19 19
20 \snippet ../example/splinechart/splinewidget.cpp add points to series
20 \snippet ../examples/splinechart/splinewidget.cpp add points to series
21 21
22 22 The data series has been populated. To display it on a chart we create QChartView object and add the data series to it. We also set the ranges on both axises, so that our chart is fully visible and there is some excess of space for adding more data points.
23 23
24 \snippet ../example/splinechart/splinewidget.cpp 3
24 \snippet ../examples/splinechart/splinewidget.cpp 3
25 25
26 26 Then we add two buttons for adding and removing data points. Buttons clicked() signals are connected to handler functions.
27 27
28 \snippet ../example/splinechart/splinewidget.cpp 4
28 \snippet ../examples/splinechart/splinewidget.cpp 4
29 29
30 30 In the end we add the chart and the buttons to the widget's layout.
31 31
32 \snippet ../example/splinechart/splinewidget.cpp 5
32 \snippet ../examples/splinechart/splinewidget.cpp 5
33 33
34 34 Here is the handler function for add new data point button:
35 35
36 \snippet ../example/splinechart/splinewidget.cpp add point
36 \snippet ../examples/splinechart/splinewidget.cpp add point
37 37
38 38 And here is one for remove the last data point in the series:
39 39
40 \snippet ../example/splinechart/splinewidget.cpp remove point
40 \snippet ../examples/splinechart/splinewidget.cpp remove point
41 41
42 42 */
@@ -1,26 +1,26
1 1 /*!
2 2 \page tutorials.html
3 3 \title Tutorials
4 4 \keyword Tutorials
5 5
6 6 For example, to create a chart with line series using a widget based application:
7 \snippet ../example/chartview/main.cpp 1
7 \snippet ../examples/chartview/main.cpp 1
8 8 \image chartview_example.jpg
9 9
10 10 To replace the line series with a pie series you use the dedicated QPieSeries class:
11 \snippet ../example/chartview/main.cpp 3
11 \snippet ../examples/chartview/main.cpp 3
12 12 \image chartview_example_pie.jpg
13 13
14 14 To use a scatter series you use QScatterSeries class:
15 \snippet ../example/chartview/main.cpp 4
15 \snippet ../examples/chartview/main.cpp 4
16 16 \image chartview_example_scatter.jpg
17 17
18 18 And to show a bar series you use one of the bar series classes, for example QBarChartSeries:
19 \snippet ../example/chartview/main.cpp 5
19 \snippet ../examples/chartview/main.cpp 5
20 20 \image chartview_example_bar.jpg
21 21
22 22 If you need to give a more professional touch to your chart you can switch from the default
23 23 theme to one of the other themes:
24 \snippet ../example/chartview/main.cpp 2
24 \snippet ../examples/chartview/main.cpp 2
25 25 \image chartview_example_theme.jpg
26 26 */
General Comments 0
You need to be logged in to leave comments. Login now