summaryrefslogtreecommitdiffstats
path: root/doc/src/examples/qmlqtsensors.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/examples/qmlqtsensors.qdoc')
-rw-r--r--doc/src/examples/qmlqtsensors.qdoc26
1 files changed, 14 insertions, 12 deletions
diff --git a/doc/src/examples/qmlqtsensors.qdoc b/doc/src/examples/qmlqtsensors.qdoc
index d8173306..4c509392 100644
--- a/doc/src/examples/qmlqtsensors.qdoc
+++ b/doc/src/examples/qmlqtsensors.qdoc
@@ -26,43 +26,45 @@
****************************************************************************/
/*!
- \example sensors/qmlqtsensors
- \title Qt Sensors - Simple QML Example
+ \example QtSensors/QtSensors_qmlqtsensors
+ \title Qt Sensors - QML example
\ingroup qtsensors-examples
- \brief The Qt Sensors simple QML example demonstrates the QML sensors elements in the QtSensors 5 import.
- \image qmlqtsensors.jpg
+ \image qmlqtsensors.png
+
+ \section2 Qt Sensors in QML
+ \brief The QML QtSensors example demonstrates the QML sensors elements in the QtSensors 5 import.
+
-\section1 Overview
To write a QML application that will use the QML sensors elements in the QtSensors 5 import you need to to the following steps:
Import the QtSensors 5.x declarative plugin:
-\snippet ../examples/sensors/qmlqtsensors/main.qml 0
+ \snippet ../examples/QtSensors/QtSensors_qmlqtsensors/QtSensors_qmlqtsensors.qml 0
Add the Sensor QML elements into your qml file.
In this example we use the TiltSensor:
-\snippet ../examples/sensors/qmlqtsensors/main.qml 1
+ \snippet ../examples/QtSensors/QtSensors_qmlqtsensors/QtSensors_qmlqtsensors.qml 1
The Tilt-, AmbientLight- and the Proximity QML element sensor have the 'enabled' property in common.
To start or stop the sensor set this property to true or false.
-\snippet ../examples/sensors/qmlqtsensors/main.qml 2
+ \snippet ../examples/QtSensors/QtSensors_qmlqtsensors/QtSensors_qmlqtsensors.qml 2
Reading the data can be done for each sensor type like following:
\l {QtSensors5::TiltSensor} {TiltSensor}
-\snippet ../examples/sensors/qmlqtsensors/main.qml 3
-\snippet ../examples/sensors/qmlqtsensors/main.qml 4
+ \snippet ../examples/QtSensors/QtSensors_qmlqtsensors/QtSensors_qmlqtsensors.qml 3
+ \snippet ../examples/QtSensors/QtSensors_qmlqtsensors/QtSensors_qmlqtsensors.qml 4
\l {QtSensors5::AmbientLightSensor} {AmbientLightSensor}
-\snippet ../examples/sensors/qmlqtsensors/main.qml 5
+ \snippet ../examples/QtSensors/QtSensors_qmlqtsensors/QtSensors_qmlqtsensors.qml 5
\l {QtSensors5::ProximitySensor} {ProximitySensor}
-\snippet ../examples/sensors/qmlqtsensors/main.qml 6
+ \snippet ../examples/QtSensors/QtSensors_qmlqtsensors/QtSensors_qmlqtsensors.qml 6
*/