##// END OF EJS Templates
Updated QML Oscilloscope documentation...
Titta Heikkala -
r2811:a137e485781a
parent child
Show More
@@ -1,65 +1,59
1 /****************************************************************************
1 /****************************************************************************
2 **
2 **
3 ** Copyright (C) 2015 The Qt Company Ltd
3 ** Copyright (C) 2015 The Qt Company Ltd
4 ** All rights reserved.
4 ** All rights reserved.
5 ** For any questions to The Qt Company, please use contact form at http://qt.io
5 ** For any questions to The Qt Company, please use contact form at http://qt.io
6 **
6 **
7 ** This file is part of the Qt Charts module.
7 ** This file is part of the Qt Charts module.
8 **
8 **
9 ** Licensees holding valid commercial license for Qt may use this file in
9 ** Licensees holding valid commercial license for Qt may use this file in
10 ** accordance with the Qt License Agreement provided with the Software
10 ** accordance with the Qt License Agreement provided with the Software
11 ** or, alternatively, in accordance with the terms contained in a written
11 ** or, alternatively, in accordance with the terms contained in a written
12 ** agreement between you and The Qt Company.
12 ** agreement between you and The Qt Company.
13 **
13 **
14 ** If you have questions regarding the use of this file, please use
14 ** If you have questions regarding the use of this file, please use
15 ** contact form at http://qt.io
15 ** contact form at http://qt.io
16 **
16 **
17 ****************************************************************************/
17 ****************************************************************************/
18
18
19 /*!
19 /*!
20 \example qmloscilloscope
20 \example qmloscilloscope
21 \title QML Oscilloscope
21 \title QML Oscilloscope
22 \ingroup qtcharts_examples
22 \ingroup qtcharts_examples
23
23
24 \image examples_qmloscilloscope.png
24 \image examples_qmloscilloscope.png
25
25
26 \brief The example shows how to implement application with strict performance requirements
26 \brief The example shows how to implement application with strict performance requirements
27 using the Qt Charts QML API.
27 using the Qt Charts QML API.
28
28
29 The oscilloscope application demonstrates how to use the Qt Charts QML API to implement an
29 The oscilloscope application demonstrates how to use the Qt Charts QML API to implement an
30 application with strict performance requirements. The application uses generated data with
30 application with strict performance requirements. The application uses generated data with
31 configurable characteristics to mimic a simple oscilloscope user interface. To find out the
31 configurable characteristics to mimic a simple oscilloscope user interface. To find out the
32 actual screen refresh performance of the application, you can set QML_SHOW_FRAMERATE = 1 to
32 actual screen refresh performance of the application, you can set QML_SHOW_FRAMERATE = 1 to
33 your run environment settings to get the framerate shown in the application output console.
33 your run environment settings to get the framerate shown in the application output console.
34 To do so go to Projects - Run - Run environment in Qt Creator and select Add. Then you can
34 To do so go to Projects - Run - Run environment in Qt Creator and select Add. Then you can
35 experiment with the different configurable options of the example application to find the
35 experiment with the different configurable options of the example application to find the
36 configuration that gives you the best performance in your environment.
36 configuration that gives you the best performance in your environment.
37
37
38 Note: You can try if enabling OpenGL improves the performance with the following startup
39 parameter:
40 \code
41 -graphicssystem opengl
42 \endcode
43
44 The application window is shared by control and scope views:
38 The application window is shared by control and scope views:
45 \snippet qmloscilloscope/qml/qmloscilloscope/main.qml 1
39 \snippet qmloscilloscope/qml/qmloscilloscope/main.qml 1
46 \dots
40 \dots
47 \snippet qmloscilloscope/qml/qmloscilloscope/main.qml 2
41 \snippet qmloscilloscope/qml/qmloscilloscope/main.qml 2
48
42
49 ControlView implements the buttons used for configuring. ScopeView uses a ChartView to show
43 ControlView implements the buttons used for configuring. ScopeView uses a ChartView to show
50 a chart with two line series:
44 a chart with two line series:
51 \snippet qmloscilloscope/qml/qmloscilloscope/ScopeView.qml 1
45 \snippet qmloscilloscope/qml/qmloscilloscope/ScopeView.qml 1
52 \dots
46 \dots
53
47
54 The data of the line series is updated with a QML timer. In a real life application the
48 The data of the line series is updated with a QML timer. In a real life application the
55 updating could be triggered with a signal from Qt C++ code.
49 updating could be triggered with a signal from Qt C++ code.
56 \snippet qmloscilloscope/qml/qmloscilloscope/ScopeView.qml 2
50 \snippet qmloscilloscope/qml/qmloscilloscope/ScopeView.qml 2
57
51
58 The oscilloscope also allows you to switch the type of the series used for visualizing the
52 The oscilloscope also allows you to switch the type of the series used for visualizing the
59 signal sources. This is implemented by dynamically destroying and creating series:
53 signal sources. This is implemented by dynamically destroying and creating series:
60 \snippet qmloscilloscope/qml/qmloscilloscope/ScopeView.qml 3
54 \snippet qmloscilloscope/qml/qmloscilloscope/ScopeView.qml 3
61
55
62 \note QML_SHOW_FRAMERATE environment variable doesn't work with Qt Quick 2.
56 \note QML_SHOW_FRAMERATE environment variable doesn't work with Qt Quick 2.
63 From Qt 5.1.0 on, the QSG_RENDER_TIMING environment variable can be used
57 From Qt 5.1.0 on, the QSG_RENDER_TIMING environment variable can be used
64 similarly to display rendering time.
58 similarly to display rendering time.
65 */
59 */
General Comments 0
You need to be logged in to leave comments. Login now