summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/src/imports/qtsensors5.qdoc54
-rw-r--r--doc/src/qtsensors.qdoc2
2 files changed, 19 insertions, 37 deletions
diff --git a/doc/src/imports/qtsensors5.qdoc b/doc/src/imports/qtsensors5.qdoc
index c8898682..5436ea2e 100644
--- a/doc/src/imports/qtsensors5.qdoc
+++ b/doc/src/imports/qtsensors5.qdoc
@@ -32,49 +32,31 @@
\section1 Overview
- The identifying string for this component is \e QtSensors.
- Use this in the QML import statement, as such: \e import QtSensors 5.0
- The QML Sensors 5 Plugin provides an easy to use interface to the Sensors API.
- It enables the receiving of sensor events and reading current values from the
- sensors.
+ Mobile devices contains sensor hardware that allow detecting changes in various physical
+ properties of the device itself or its immediate environment. Examples of device properties
+ include the angle at which the device is held, whereas environmental properties include for
+ example the current level of ambient light.
- The plugin contains many sensor types and properties to read values.
- As an example, consider the tilt sensor. The \l {QML Qt Sensors example}
- simply displays text on-screen to show the current tilt value.
+ These properties can be either actual values, such as the tilt angle in
+ degrees, or approximations, like the enumeration describing brightness in
+ relative terms using values such as AmbientLightSensor.Dark and AmbientLightSensor.Bright.
- The QML code to read the value is quite simple. Below is a QML \l TiltSensor element
- declared with an id of \e tilt. The sensor is started by setting the running
- property to true. The element receives a signal when the x and y rotation
- changes and it can be picked up by the onXRotationChanged and onYRotationChanged
- slot. Now the xRotation and yRotation property of this element can be used to
- extract the current tilt value so that it can be used for further calculations.
+ The latter type of value is also based on a natural phenomenon (in the case
+ of the ambient light sensor, the amount of visible light emitted by a source), but the value
+ itself is descriptive instead of using any effective unit of measurement, such as lumen.
- \qml
- TiltSensor {
- id: tilt
- enabled: false
- unit: TiltSensor.Degrees
- accuracy: 1.0
- }
- \endqml
+ The identifying string for this component is \e QtSensors.
+ Use this in the QML import statement, as such: \e import QtSensors 5.0
- \qml
- Text {
- x:5
- y:160
- text: "X Rotation: " + tilt.xRotation
- }
- \endqml
+ Qt Sensors QML API provides an easy to use interface to the Qt Sensors API.
+ It enables the receiving of sensor events and reading current values from the
+ sensors.
- \qml
- Text {
- x:5
- y:180
- text: "Y Rotation: " + tilt.yRotation
- }
+ The emulator supports simulating the Ambient Light, Orientation, Compass and Proximity sensors.
- \endqml
+ The \l {QML Qt Sensors example} contains code for using the the \l TiltSensor, \l AmbientLightSensor
+ and ProximitySensor elements.
\section1 QML Elements
diff --git a/doc/src/qtsensors.qdoc b/doc/src/qtsensors.qdoc
index f67410cb..925bc5af 100644
--- a/doc/src/qtsensors.qdoc
+++ b/doc/src/qtsensors.qdoc
@@ -31,7 +31,7 @@
\brief The Qt Sensors API provides access to sensors via QML and C++ interfaces.
\ingroup technology-apis
- The Qt Sensors API provides access to sensors via QML and C++ interfaces.
+ The Qt Sensors API provides access to sensor hardware via QML and C++ interfaces.
\section1 Information for Application Writers