summaryrefslogtreecommitdiffstats
path: root/src/imports/sensors2
diff options
context:
space:
mode:
authorLorn Potter <lorn.potter@nokia.com>2012-03-29 11:09:41 +1000
committerQt by Nokia <qt-info@nokia.com>2012-03-29 05:41:37 +0200
commit6c06a5536ad4dfe72423915c9bf99cd25a6c9b93 (patch)
treeb15763bbd2784ee223e7eb5dbf7faae95d7413c0 /src/imports/sensors2
parent2646629ea49cf808220ef54c77df613cc9fea474 (diff)
fix up documentation according to the doc guys.
Change-Id: I417e3c57e986f9364f25d5a0e742bd31833de283 Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com> Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
Diffstat (limited to 'src/imports/sensors2')
-rw-r--r--src/imports/sensors2/qsensor2ambientlight.cpp13
-rw-r--r--src/imports/sensors2/qsensor2common.cpp4
-rw-r--r--src/imports/sensors2/qsensor2gesture.cpp24
-rw-r--r--src/imports/sensors2/qsensor2proximity.cpp11
-rw-r--r--src/imports/sensors2/qsensor2tilt.cpp17
5 files changed, 47 insertions, 22 deletions
diff --git a/src/imports/sensors2/qsensor2ambientlight.cpp b/src/imports/sensors2/qsensor2ambientlight.cpp
index 6a4fe0e1..ae4f54df 100644
--- a/src/imports/sensors2/qsensor2ambientlight.cpp
+++ b/src/imports/sensors2/qsensor2ambientlight.cpp
@@ -50,9 +50,14 @@ QT_BEGIN_NAMESPACE
\inqmlmodule QtSensors 5
\ingroup qml-QtSensors5
\since QtSensors 5.0
- \brief The AmbientLightSensor element provides easy access to determine the ambient light by using the ambient light sensor.
+ \brief Provides access to the current ambient light level.
+
+ This element provides easy access to determine the ambient light by using the ambient light sensor.
+ For example brightening the screen according to whether the device is in full sunlight or not.
This element is part of the \b{QtSensors 5} module.
+
+ The \l {QML Qt Sensors example} is an example how to use this QML element.
*/
QSensor2AmbientLight::QSensor2AmbientLight(QObject* parent)
: qsensor2common(parent)
@@ -83,13 +88,13 @@ QSensor2AmbientLight::~QSensor2AmbientLight()
\li It is moderately dark.
\row
\li AmbientLightSensor.Light
- \li It is light (eg. internal lights).
+ \li It is light (internal lights).
\row
\li AmbientLightSensor.Bright
- \li It is bright (eg. outside but in the shade).
+ \li It is bright (outside but in the shade).
\row
\li AmbientLightSensor.Sunny
- \li It is very bright (eg. direct sunlight).
+ \li It is very bright (direct sunlight).
\endtable
*/
QSensor2AmbientLight::LightLevel QSensor2AmbientLight::lightLevel()
diff --git a/src/imports/sensors2/qsensor2common.cpp b/src/imports/sensors2/qsensor2common.cpp
index 4c66d019..2deb94f2 100644
--- a/src/imports/sensors2/qsensor2common.cpp
+++ b/src/imports/sensors2/qsensor2common.cpp
@@ -66,7 +66,7 @@ qsensor2common::~qsensor2common()
/*!
\qmlproperty bool QtSensors5::Sensor::enabled
- Starts or stops the sensor.
+ Starts or stops the sensor. Default value is false.
*/
bool qsensor2common::enabled()
@@ -91,7 +91,7 @@ void qsensor2common::setEnabled(bool val)
/*!
\qmlproperty bool QtSensors5::Sensor::alwaysOn
- Keeps the sensor running when the screen turns off.
+ Keeps the sensor running when the screen turns off. Default value is false.
*/
bool qsensor2common::alwaysOn()
diff --git a/src/imports/sensors2/qsensor2gesture.cpp b/src/imports/sensors2/qsensor2gesture.cpp
index ef17c3f9..14690f35 100644
--- a/src/imports/sensors2/qsensor2gesture.cpp
+++ b/src/imports/sensors2/qsensor2gesture.cpp
@@ -51,11 +51,17 @@ QT_BEGIN_NAMESPACE
\qmlclass SensorGesture QSensor2Gesture
\inqmlmodule QtSensors 5
\since QtSensors 5.0
- \brief The SensorGesture element provides notification when sensor gestures are triggered.
+ \brief Provides notifications when sensor-based gestures are detected.
+
+ This element provides notification when sensor gestures are triggered.
This element is part of the \b{QtSensors 5} module.
- The following QML code creates a "shake" and "template" SensorGesture QML element.
+ The following QML code creates a "shake" and "template" SensorGesture QML element, and
+ displays the detected gesture in a text element.
+
+ QtSensors.shake gesture is available with the Qt Sensors API, but the QtSensors.SecondCounter
+ sensor gesture is provided as example code for the \l {SensorGesture QML Element example}
\qml
Item {
@@ -76,8 +82,9 @@ QT_BEGIN_NAMESPACE
}
\endqml
-A list of currently supported sensor gestures and their descriptions can be found here:
-\l {Qt Sensor Gestures}
+ \l {Qt Sensor Gestures} contains a list of currently supported sensor gestures and their
+ descriptions.
+
*/
QSensor2Gesture::QSensor2Gesture(QObject* parent)
@@ -125,11 +132,11 @@ QStringList QSensor2Gesture::availableGestures()
}
/*!
- \qmlproperty string QtSensors5::SensorGesture::gestures
- Set this property to the gestures the application is interested in detecting.
- The properties validGestures and invalidGestures will be set as appropriate immediately.
- The list of available gestures can be found in the availableGestures property.
+ \qmlproperty stringlist QtSensors5::SensorGesture::gestures
+ Set this property to a list of the gestures that the application is interested in detecting.
This property cannot be changed while the element is enabled.
+
+ The properties validGestures and invalidGestures will be set as appropriate immediately.
To determine all available getures on the system please use the
\l {QtSensors5::SensorGesture::availableGestures} {availableGestures} property.
@@ -181,6 +188,7 @@ QStringList QSensor2Gesture::invalidGestures() const
/*!
\qmlproperty bool QtSensors5::SensorGesture::enabled
This property can be used to activate or deactivate the sensor gesture.
+ Default value is false;
\sa {QtSensors5::SensorGesture::detected} {detected}
*/
bool QSensor2Gesture::enabled() const
diff --git a/src/imports/sensors2/qsensor2proximity.cpp b/src/imports/sensors2/qsensor2proximity.cpp
index ac2cf30a..7433e80e 100644
--- a/src/imports/sensors2/qsensor2proximity.cpp
+++ b/src/imports/sensors2/qsensor2proximity.cpp
@@ -50,9 +50,15 @@ QT_BEGIN_NAMESPACE
\inqmlmodule QtSensors 5
\ingroup qml-QtSensors5
\since QtSensors 5.0
- \brief The ProximitySensor element provides an easy access to determine if the proximity of the mobile user by using the proximity sensor.
+ \brief Provides access to the proximity sensor.
+
+ This element allows determining if something is held in close proximity to the device, such
+ as determining if the user is holding the device to their ear.
This element is part of the \b{QtSensors 5} module.
+
+ The \l {QML Qt Sensors example} is an example how to use this QML element.
+
*/
QSensor2Proximity::QSensor2Proximity(QObject* parent)
@@ -70,7 +76,8 @@ QSensor2Proximity::~QSensor2Proximity()
/*!
\qmlproperty bool QtSensors5::ProximitySensor::near
This property holds whether the sensor has detected something in close proximity.
- Device dependent, but typically 1-2 cm.
+ The definition of close proximity is device dependent, but it
+ typically stands for a distance of 1-2 cm.
*/
bool QSensor2Proximity::near()
{
diff --git a/src/imports/sensors2/qsensor2tilt.cpp b/src/imports/sensors2/qsensor2tilt.cpp
index f1d8a6a9..8593f6d8 100644
--- a/src/imports/sensors2/qsensor2tilt.cpp
+++ b/src/imports/sensors2/qsensor2tilt.cpp
@@ -55,9 +55,16 @@ QT_BEGIN_NAMESPACE
\inqmlmodule QtSensors 5
\ingroup qml-QtSensors5
\since QtSensors 5.0
- \brief The TiltSensor element provides tilt datas from x and y rotation of the device using the accelerometer sensor.
+ \brief Provides access to the current X and Y axis rotation angles of the device.
+
+ This element provides tilt data from the rotation around the x and y axis of the device using
+ the accelerometer sensor. Like for a marble and maze game, where the marble is rolled
+ around the screen according to the user tilting the device.
This element is part of the \b{QtSensors 5} module.
+
+ The \l {QML Qt Sensors example} is an example how to use this QML element.
+
*/
QSensor2Tilt::QSensor2Tilt(QObject* parent)
: qsensor2common(parent)
@@ -285,13 +292,11 @@ inline qreal calcRoll(double Ax, double Ay, double Az)
This property contains the accuracy (in degrees) in which the rotation should be measured.
This can be used to minimize signal emiting and therefore saving of performance.
Default value is 1 degree.
- The accuracy value is unsigned and works clockwise and anti-clockwise in X and Y axis rotation directions.
- Accuracy range can be 0 to 90 degrees.
-
-
- E.g.
+ The accuracy value is unsigned and works clockwise and counterclockwise in X and Y axis rotation
+ directions. Accuracy range can be 0 to 90 degrees.
+ For example:
Accuracy 5.5 will notify the client application about an rotation change only if the rotation angle over the X and / or Y axis was changed by 5.5 or more degrees clockwise or anti-clockwise.
\table