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