##// 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 3 ** Copyright (C) 2015 The Qt Company Ltd
4 4 ** All rights reserved.
5 5 ** For any questions to The Qt Company, please use contact form at http://qt.io
6 6 **
7 7 ** This file is part of the Qt Charts module.
8 8 **
9 9 ** Licensees holding valid commercial license for Qt may use this file in
10 10 ** accordance with the Qt License Agreement provided with the Software
11 11 ** or, alternatively, in accordance with the terms contained in a written
12 12 ** agreement between you and The Qt Company.
13 13 **
14 14 ** If you have questions regarding the use of this file, please use
15 15 ** contact form at http://qt.io
16 16 **
17 17 ****************************************************************************/
18 18
19 19 /*!
20 20 \example qmloscilloscope
21 21 \title QML Oscilloscope
22 22 \ingroup qtcharts_examples
23 23
24 24 \image examples_qmloscilloscope.png
25 25
26 26 \brief The example shows how to implement application with strict performance requirements
27 27 using the Qt Charts QML API.
28 28
29 29 The oscilloscope application demonstrates how to use the Qt Charts QML API to implement an
30 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
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.
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
36 configuration that gives you the best performance in your environment.
31 configurable characteristics to mimic a simple oscilloscope user interface.
32
33 To get information about actual rendering speed shown in the application output console, you can
34 set QSG_RENDER_TIMING = 1 to your run environment settings. To do so go to Projects - Run -
35 Run environment in Qt Creator and select Add. Then you can experiment with the different
36 configurable options of the example application to find the configuration that gives you the
37 best performance in your environment.
37 38
38 39 The application window is shared by control and scope views:
39 40 \snippet qmloscilloscope/qml/qmloscilloscope/main.qml 1
40 41 \dots
41 42 \snippet qmloscilloscope/qml/qmloscilloscope/main.qml 2
42 43
43 44 ControlView implements the buttons used for configuring. ScopeView uses a ChartView to show
44 45 a chart with two line series:
45 46 \snippet qmloscilloscope/qml/qmloscilloscope/ScopeView.qml 1
46 47 \dots
47 48
48 49 The data of the line series is updated with a QML timer. In a real life application the
49 50 updating could be triggered with a signal from Qt C++ code.
50 51 \snippet qmloscilloscope/qml/qmloscilloscope/ScopeView.qml 2
51 52
52 53 The oscilloscope also allows you to switch the type of the series used for visualizing the
53 54 signal sources. This is implemented by dynamically destroying and creating series:
54 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