From 17d908ba5205513e9ed0be33aebeb3736bda0326 Mon Sep 17 00:00:00 2001 From: Wolfgang Beck Date: Thu, 17 May 2012 12:27:18 +1000 Subject: Unfork the examples. Some examples were forked off and updated. Unfork by bringing these changes back (a later update will bring the other examples in line with this new style). The changes are primarily made up of file renaming. Also, JPG files have been converted to PNG. Some documentation updates have been done. Change-Id: Ib090abb5ebea2003d479d2336a23317f52b8c4d8 Reviewed-by: Lincoln Ramsay --- doc/src/examples/qmlqtsensors.qdoc | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'doc/src/examples/qmlqtsensors.qdoc') 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 */ -- cgit v1.2.3