##// END OF EJS Templates
Updated QML Oscilloscope documentation...
Titta Heikkala -
r2819:3a89e3fee61a
parent child
Show More
@@ -1,59 +1,57
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.
32 actual screen refresh performance of the application, you can set QML_SHOW_FRAMERATE = 1 to
32
33 your run environment settings to get the framerate shown in the application output console.
33 To get information about actual rendering speed shown in the application output console, you can
34 To do so go to Projects - Run - Run environment in Qt Creator and select Add. Then you can
34 set QSG_RENDER_TIMING = 1 to your run environment settings. To do so go to Projects - Run -
35 experiment with the different configurable options of the example application to find the
35 Run environment in Qt Creator and select Add. Then you can experiment with the different
36 configuration that gives you the best performance in your environment.
36 configurable options of the example application to find the configuration that gives you the
37 best performance in your environment.
37
38
38 The application window is shared by control and scope views:
39 The application window is shared by control and scope views:
39 \snippet qmloscilloscope/qml/qmloscilloscope/main.qml 1
40 \snippet qmloscilloscope/qml/qmloscilloscope/main.qml 1
40 \dots
41 \dots
41 \snippet qmloscilloscope/qml/qmloscilloscope/main.qml 2
42 \snippet qmloscilloscope/qml/qmloscilloscope/main.qml 2
42
43
43 ControlView implements the buttons used for configuring. ScopeView uses a ChartView to show
44 ControlView implements the buttons used for configuring. ScopeView uses a ChartView to show
44 a chart with two line series:
45 a chart with two line series:
45 \snippet qmloscilloscope/qml/qmloscilloscope/ScopeView.qml 1
46 \snippet qmloscilloscope/qml/qmloscilloscope/ScopeView.qml 1
46 \dots
47 \dots
47
48
48 The data of the line series is updated with a QML timer. In a real life application the
49 The data of the line series is updated with a QML timer. In a real life application the
49 updating could be triggered with a signal from Qt C++ code.
50 updating could be triggered with a signal from Qt C++ code.
50 \snippet qmloscilloscope/qml/qmloscilloscope/ScopeView.qml 2
51 \snippet qmloscilloscope/qml/qmloscilloscope/ScopeView.qml 2
51
52
52 The oscilloscope also allows you to switch the type of the series used for visualizing the
53 The oscilloscope also allows you to switch the type of the series used for visualizing the
53 signal sources. This is implemented by dynamically destroying and creating series:
54 signal sources. This is implemented by dynamically destroying and creating series:
54 \snippet qmloscilloscope/qml/qmloscilloscope/ScopeView.qml 3
55 \snippet qmloscilloscope/qml/qmloscilloscope/ScopeView.qml 3
55
56
56 \note QML_SHOW_FRAMERATE environment variable doesn't work with Qt Quick 2.
57 From Qt 5.1.0 on, the QSG_RENDER_TIMING environment variable can be used
58 similarly to display rendering time.
59 */
57 */
General Comments 0
You need to be logged in to leave comments. Login now