|
1 | NO CONTENT: new file 100644, binary diff hidden |
|
1 | NO CONTENT: new file 100644, binary diff hidden |
|
1 | NO CONTENT: new file 100644, binary diff hidden |
|
1 | NO CONTENT: new file 100644, binary diff hidden |
@@ -1,14 +1,12 | |||
|
1 | 1 | /*! |
|
2 | 2 | \example demos/chartthemes |
|
3 | 3 | \title Chart themes demo |
|
4 | 4 | \subtitle |
|
5 | 5 | |
|
6 | \image demo_chartthemes_small.png | |
|
7 | ||
|
8 | 6 | This demo shows the look and feel of the different built in themes for all supported chart types. |
|
9 | 7 | The background palette of the application is also customized according to the selected theme, to make the result |
|
10 | 8 | look harmonious. |
|
11 | 9 | \image demo_chartthemes_light.png |
|
12 | 10 | \image demo_chartthemes_brown_sand.png |
|
13 | 11 | \image demo_chartthemes_blue_cerulean.png |
|
14 | 12 | */ |
@@ -1,48 +1,48 | |||
|
1 | 1 | /*! |
|
2 |
|
|
|
3 |
|
|
|
4 |
|
|
|
2 | \example examples/presenterchart | |
|
3 | \title PresenterChart Example | |
|
4 | \subtitle | |
|
5 | 5 | |
|
6 |
|
|
|
7 |
|
|
|
8 | Please note this example does not use common data model. A use of common data model is documented here.[TODO] | |
|
6 | The example shows how to create chart which presents the same set of data as line, scatter, spline and area charts. | |
|
7 | ChartPresenter will switch between these four chart types every few seconds. Note: You can also use the | |
|
8 | QAbstractItemModel related APIs to pass data for the different series types. See the \l {Model data example} for | |
|
9 | more details. | |
|
9 | 10 | |
|
10 | \image presenterchart1.png | |
|
11 | \image presenterchart2.png | |
|
12 | \image presenterchart3.png | |
|
13 | \image presenterchart4.png | |
|
11 | \image examples_presenterchart1.png | |
|
12 | \image examples_presenterchart2.png | |
|
13 | \image examples_presenterchart3.png | |
|
14 | \image examples_presenterchart4.png | |
|
14 | 15 | |
|
15 | 16 | We create simple ChartView class which derives form QChartView. |
|
16 | 17 | |
|
17 | 18 | \snippet ../examples/presenterchart/chartview.h 1 |
|
18 | 19 | |
|
19 | 20 | Class will implement \c handleTimeout() slot which we are going to use to trigger switching between different chart presentations. |
|
20 | 21 | We are also going to provide \c handlePoitClicked() slot which will show clicked point on the chart. |
|
21 | 22 | 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 |
|
22 | 23 | using QLineSeries , as scatter chart using QScatterSeries, as a spline chart using QSplineSeries and a area chart using QAreaSeries. We create needed instances in constructor of ChartView class. |
|
23 | 24 | We set custom line and points colors. |
|
24 | 25 | |
|
25 | 26 | \snippet ../examples/presenterchart/chartview.cpp 1 |
|
26 | 27 | |
|
27 |
We add data to three series. Please note area chart is going to use QLineSeries as the upper line. We can use add() member function. |
|
|
28 | it is wiser to use shared data model, as described here.[TODO] | |
|
28 | We add data to three series. Please note area chart is going to use QLineSeries as the upper line. We can use add() member function. | |
|
29 | 29 | |
|
30 | 30 | \snippet ../examples/presenterchart/chartview.cpp 2 |
|
31 | 31 | |
|
32 | 32 | In the end we store references all the created series and matching titles. |
|
33 | 33 | |
|
34 | 34 | \snippet ../examples/presenterchart/chartview.cpp 3 |
|
35 | 35 | |
|
36 | 36 | We connect \c clicked() signals from each series with our \c handlePointClciked() slot. |
|
37 | 37 | |
|
38 | 38 | \snippet ../examples/presenterchart/chartview.cpp 4 |
|
39 | 39 | |
|
40 | 40 | 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. |
|
41 | 41 | |
|
42 | 42 | \snippet ../examples/presenterchart/chartview.cpp 5 |
|
43 | 43 | |
|
44 | 44 | In \c handlePointClciked() slot we set the chart's title to show clicked point x and y coordinates. |
|
45 | 45 | |
|
46 | 46 | \snippet ../examples/presenterchart/chartview.cpp 6 |
|
47 | 47 | |
|
48 | */ No newline at end of file | |
|
48 | */ |
@@ -1,44 +1,44 | |||
|
1 | 1 | /*! |
|
2 | 2 | \page index.html |
|
3 | 3 | \keyword About |
|
4 | 4 | |
|
5 | 5 | \raw HTML |
|
6 | 6 | <div class="qchart"> |
|
7 | 7 | <img src="images/qt_commercial_logo.png" alt="qtcommercial"/> |
|
8 | 8 | |
|
9 | 9 | <p> |
|
10 | 10 | QCharts is a part of Qt Commercial addons package. It provides a set of easy to use chart |
|
11 | 11 | components which are available for Qt Commercial customers. It uses Qt Graphics View |
|
12 | 12 | Framework, therefore charts can be easily integrated to modern 2D user interfaces. QCharts can |
|
13 | 13 | be used as QWidgets, QGraphicsWidget or QML elements. Users can easily create impressive |
|
14 | 14 | graphs by selecting one of the charts themes. |
|
15 | 15 | </p> |
|
16 | 16 | |
|
17 | 17 | <table> |
|
18 | 18 | <tr> |
|
19 | 19 | <td><a href="examples-linechart.html"><img src="images/examples_linechart.png" alt="linechart" /></a></td> |
|
20 | 20 | <td><a href="examples-areachart.html"><img src="images/examples_areachart.png" alt="areachart" /></a></td> |
|
21 | 21 | </tr> |
|
22 | 22 | <tr> |
|
23 | 23 | <td><a href="examples-scatterchart.html"><img src="images/examples_scatterchart.png" alt="scatterchart" /></a></td> |
|
24 | 24 | <td><a href="examples-barchart.html"><img src="images/examples_barchart.png" alt="barchart" /></a></td> |
|
25 | 25 | </tr> |
|
26 | 26 | <tr> |
|
27 | 27 | <td><a href="examples-stackedbarchart.html"><img src="images/examples_stackedbarchart.png" alt="stackedbarchart" /></a></td> |
|
28 | 28 | <td><a href="examples-percentbarchart.html"><img src="images/examples_percentbarchart.png" alt="percentbarcchart" /></a></td> |
|
29 | 29 | </tr> |
|
30 | 30 | <tr> |
|
31 | 31 | <td><a href="examples-splinechart.html"><img src="images/examples_splinechart.png" alt="linechart" /></a></td> |
|
32 | 32 | <td><a href="examples-piechart.html"><img src="images/examples_piechart.png" alt="piechart" /></a></td> |
|
33 | 33 | </tr> |
|
34 | 34 | <tr> |
|
35 | 35 | <td><a href="examples-customchart.html"><img src="images/examples_customchart.png" alt="customerchart" /></a></td> |
|
36 | 36 | <td><a href="examples-zoomlinechart.html"><img src="images/examples_zoomlinechart2.png" alt="zoomlinechart" /></a></td> |
|
37 | 37 | </tr> |
|
38 | 38 | <tr> |
|
39 |
<td><a href="demos-chartthemes.html"><img src="images/demo_chartthemes_ |
|
|
39 | <td><a href="demos-chartthemes.html"><img src="images/demo_chartthemes_blue_cerulean.png" width=514 alt="charttheme" /></a></td> | |
|
40 | 40 | </tr> |
|
41 | 41 | </table> |
|
42 | 42 | </div> |
|
43 | 43 | \endraw |
|
44 | 44 | */ |
@@ -1,37 +1,39 | |||
|
1 | 1 | /**************************************************************************** |
|
2 | 2 | ** |
|
3 | 3 | ** Copyright (C) 2012 Digia Plc |
|
4 | 4 | ** All rights reserved. |
|
5 | 5 | ** For any questions to Digia, please use contact form at http://qt.digia.com |
|
6 | 6 | ** |
|
7 | 7 | ** This file is part of the Qt Commercial Charts Add-on. |
|
8 | 8 | ** |
|
9 | 9 | ** $QT_BEGIN_LICENSE$ |
|
10 | 10 | ** Licensees holding valid Qt Commercial licenses may use this file in |
|
11 | 11 | ** accordance with the Qt Commercial License Agreement provided with the |
|
12 | 12 | ** Software or, alternatively, in accordance with the terms contained in |
|
13 | 13 | ** a written agreement between you and Digia. |
|
14 | 14 | ** |
|
15 | 15 | ** If you have questions regarding the use of this file, please use |
|
16 | 16 | ** contact form at http://qt.digia.com |
|
17 | 17 | ** $QT_END_LICENSE$ |
|
18 | 18 | ** |
|
19 | 19 | ****************************************************************************/ |
|
20 | 20 | |
|
21 | 21 | #include "chartview.h" |
|
22 | 22 | #include <QApplication> |
|
23 | 23 | #include <QMainWindow> |
|
24 | 24 | |
|
25 | 25 | int main(int argc, char *argv[]) |
|
26 | 26 | { |
|
27 | 27 | QApplication a(argc, argv); |
|
28 | 28 | QMainWindow window; |
|
29 | 29 | QChart* chart = new QChart(); |
|
30 | chart->axisX()->setNiceNumbers(true); | |
|
31 | chart->axisY()->setNiceNumbers(true); | |
|
30 | 32 | ChartView chartView(chart,&window); |
|
31 | 33 | chartView.setRenderHint(QPainter::Antialiasing); |
|
32 | 34 | chart->setAnimationOptions(QChart::AllAnimations); |
|
33 | 35 | window.setCentralWidget(&chartView); |
|
34 | 36 | window.resize(400, 300); |
|
35 | 37 | window.show(); |
|
36 | 38 | return a.exec(); |
|
37 | 39 | } |
|
1 | NO CONTENT: file was removed, binary diff hidden |
|
1 | NO CONTENT: file was removed, binary diff hidden |
|
1 | NO CONTENT: file was removed, binary diff hidden |
|
1 | NO CONTENT: file was removed, binary diff hidden |
|
1 | NO CONTENT: file was removed, binary diff hidden |
|
1 | NO CONTENT: file was removed, binary diff hidden |
General Comments 0
You need to be logged in to leave comments.
Login now