summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergio Ahumada <sergio.ahumada@digia.com>2013-11-08 18:18:19 +0100
committerSergio Ahumada <sergio.ahumada@digia.com>2013-11-08 18:18:19 +0100
commit9e51dc1175a696eba275d9bec6fc60148a942db6 (patch)
tree35a0163d12d134a76dec480031a9b36bc62e71b3
parent7e515c17df4e145c804f5d53458b8ac8845dcbb6 (diff)
parente3af89e2630bba68d3f10a33bccdd19bbc46664d (diff)
Merge remote-tracking branch 'origin/stable' into dev
-rw-r--r--examples/sensors/grue/import/import.pro2
-rw-r--r--examples/sensors/grue/qml.pro2
-rw-r--r--examples/sensors/qmlsensorgestures/GestureList.qml15
-rw-r--r--examples/sensors/qmlsensorgestures/GestureView.qml35
-rw-r--r--examples/sensors/qmlsensorgestures/GesturesView.qml54
-rw-r--r--examples/sensors/qmlsensorgestures/doc/src/qmlsensorgestures.qdoc (renamed from examples/sensors/qmlsensorgestures/doc/src/qmlsensorgtestures.qdoc)41
-rw-r--r--examples/sensors/qmlsensorgestures/qmlsensorgestures.qml6
-rw-r--r--src/plugins/sensors/blackberry/bbmagnetometer.cpp43
-rw-r--r--src/plugins/sensors/blackberry/bbsensorbackend.cpp8
-rw-r--r--src/sensors/doc/qtsensors.qdocconf2
-rw-r--r--src/sensors/doc/src/compatmap.qdoc4
-rw-r--r--src/sensors/doc/src/genericbackend.qdoc2
-rw-r--r--src/sensors/doc/src/porting.qdoc19
-rw-r--r--src/sensors/doc/src/qtsensorgestures-cpp.qdoc18
-rw-r--r--src/sensors/doc/src/qtsensorgestures-emulator.qdoc16
-rw-r--r--src/sensors/doc/src/qtsensorgestures-plugins.qdoc42
-rw-r--r--src/sensors/doc/src/qtsensors-backend.qdoc104
-rw-r--r--src/sensors/doc/src/qtsensors-cpp.qdoc24
-rw-r--r--src/sensors/doc/src/qtsensors.qdoc9
-rw-r--r--src/sensors/doc/src/qtsensors5.qdoc8
-rw-r--r--src/sensors/doc/src/sensorfwbackend.qdoc8
21 files changed, 231 insertions, 231 deletions
diff --git a/examples/sensors/grue/import/import.pro b/examples/sensors/grue/import/import.pro
index 56623daa..87e3c91b 100644
--- a/examples/sensors/grue/import/import.pro
+++ b/examples/sensors/grue/import/import.pro
@@ -21,7 +21,7 @@ target.path=$$DESTPATH
INSTALLS += target
qmldir.files=$$PWD/qmldir
-qmldir.path=$$DESTDIR
+qmldir.path=$$DESTPATH
INSTALLS += qmldir
OTHER_FILES += \
diff --git a/examples/sensors/grue/qml.pro b/examples/sensors/grue/qml.pro
index ff0963fc..47e21fd8 100644
--- a/examples/sensors/grue/qml.pro
+++ b/examples/sensors/grue/qml.pro
@@ -1,5 +1,5 @@
TEMPLATE = app
-TARGET = grue
+TARGET = grue_app
QT += quick
SOURCES = main.cpp
diff --git a/examples/sensors/qmlsensorgestures/GestureList.qml b/examples/sensors/qmlsensorgestures/GestureList.qml
index ea79af3b..a7cf0964 100644
--- a/examples/sensors/qmlsensorgestures/GestureList.qml
+++ b/examples/sensors/qmlsensorgestures/GestureList.qml
@@ -68,8 +68,7 @@ Rectangle {
border.width: 1
anchors.margins: 5
- property string selectedGesture: "";
- signal selectedGestureChanged();
+ property string selectedGesture: ""
SensorGesture {
id: gesture
@@ -98,15 +97,20 @@ Rectangle {
//! [4]
ListView {
id: gestureList
+//! [4]
anchors.fill: gestureListRect
anchors.margins: 5
+//! [5]
model: gesture.availableGestures
+//! [5]
focus: true
currentIndex: -1
delegate: gestureListDelegate
clip: true
+//! [6]
}
-//! [4]
+//! [6]
+
Component {
id: gestureListDelegate
@@ -122,9 +126,8 @@ Rectangle {
MouseArea {
anchors.fill: parent
onClicked: {
- gestureList.currentIndex = index;
- selectedGesture = model.modelData;
- selectedGestureChanged();
+ gestureList.currentIndex = index
+ selectedGesture = model.modelData
}
}
}
diff --git a/examples/sensors/qmlsensorgestures/GestureView.qml b/examples/sensors/qmlsensorgestures/GestureView.qml
index c12c6f28..8449f18a 100644
--- a/examples/sensors/qmlsensorgestures/GestureView.qml
+++ b/examples/sensors/qmlsensorgestures/GestureView.qml
@@ -73,26 +73,26 @@ import QtSensors 5.0
*/
Rectangle {
- id: gesturerect
+ id: gestureRect
border.width: 1
anchors.margins: 5
//! [2]
- property alias gestureid: sensorGesture.gestures
+ property alias gestureId: sensorGesture.gestures
//! [2]
- property alias gesturetitle: titleText.text
+ property alias gestureTitle: titleText.text
property alias enabled: sensorGesture.enabled
- property string oldgesture: ""
+ property string oldGesture: ""
property int count: 0
//! [1]
SensorGesture {
id: sensorGesture
enabled: false
- onDetected:{
- if (gesture !== oldgesture)
+ onDetected: {
+ if (gesture !== oldGesture)
count = 0;
valueText.text = gesture + " " + count;
- oldgesture = gesture;
+ oldGesture = gesture;
count++;
}
onEnabledChanged: {
@@ -103,9 +103,9 @@ Rectangle {
Text {
id: titleText
- anchors.top: gesturerect.top
- anchors.left: gesturerect.left
- anchors.right: gesturerect.right
+ anchors.top: gestureRect.top
+ anchors.left: gestureRect.left
+ anchors.right: gestureRect.right
horizontalAlignment: Text.AlignHCenter
font.pixelSize: 20
font.bold: true
@@ -115,28 +115,27 @@ Rectangle {
Text {
id: detectionText
anchors.top: titleText.bottom
- anchors.left: gesturerect.left
- anchors.right: gesturerect.right
+ anchors.left: gestureRect.left
+ anchors.right: gestureRect.right
horizontalAlignment: Text.AlignHCenter
font.pixelSize: 15
- text: "detection:"
+ text: "Detection:"
}
Text {
id: valueText
anchors.top: detectionText.bottom
- anchors.left: gesturerect.left
- anchors.right: gesturerect.right
+ anchors.left: gestureRect.left
+ anchors.right: gestureRect.right
horizontalAlignment: Text.AlignHCenter
font.pixelSize: 15
- text: ("")
visible: sensorGesture.enabled
}
Button{
id: gestureStartStopButton
- anchors.left: gesturerect.left
- anchors.bottom: gesturerect.bottom
+ anchors.left: gestureRect.left
+ anchors.bottom: gestureRect.bottom
height: 30
width: 100
buttonText: (sensorGesture.enabled ? "Stop" : "Start")
diff --git a/examples/sensors/qmlsensorgestures/GesturesView.qml b/examples/sensors/qmlsensorgestures/GesturesView.qml
index ceab8d10..46e8fead 100644
--- a/examples/sensors/qmlsensorgestures/GesturesView.qml
+++ b/examples/sensors/qmlsensorgestures/GesturesView.qml
@@ -70,86 +70,86 @@ import QtSensors 5.0
*/
Rectangle {
- id: gesturerect
+ id: gestureRect
border.width: 1
anchors.margins: 5
- property alias enabled: sensorGuesture.enabled
+ property alias enabled: sensorGesture.enabled
property int count: 0
property int count1: 0
SensorGesture {
- id: sensorGuesture
+ id: sensorGesture
enabled: true
gestures: availableGestures
onDetected:{
if (gesture === "QtSensors.shake")
- gesturerect.count++;
+ gestureRect.count++;
else
- gesturerect.count1++;
+ gestureRect.count1++;
}
onEnabledChanged: {
- gesturerect.count = 0;
- gesturerect.count1 = 0;
+ gestureRect.count = 0;
+ gestureRect.count1 = 0;
}
}
Text {
id: titleText
- anchors.top: gesturerect.top
- anchors.left: gesturerect.left
- anchors.right: gesturerect.right
+ anchors.top: gestureRect.top
+ anchors.left: gestureRect.left
+ anchors.right: gestureRect.right
horizontalAlignment: Text.AlignHCenter
font.pixelSize: 20
font.bold: true
- text: "templates gestures"
+ text: "Gesture Counter"
}
Text {
id: detectionText
anchors.top: titleText.bottom
- anchors.left: gesturerect.left
- anchors.right: gesturerect.right
+ anchors.left: gestureRect.left
+ anchors.right: gestureRect.right
horizontalAlignment: Text.AlignHCenter
font.pixelSize: 15
- text: "shake : SecondCounter"
+ text: "Shake : SecondCounter"
}
Text {
id: valueText
anchors.top: detectionText.bottom
- anchors.left: gesturerect.left
- width: gesturerect.width / 2
+ anchors.left: gestureRect.left
+ width: gestureRect.width / 2
horizontalAlignment: Text.AlignHCenter
font.pixelSize: 15
- text: gesturerect.count
- visible: sensorGuesture.enabled
+ text: gestureRect.count
+ visible: sensorGesture.enabled
}
Text {
id: valueText1
anchors.top: detectionText.bottom
- anchors.right: gesturerect.right
- width: gesturerect.width / 2
+ anchors.right: gestureRect.right
+ width: gestureRect.width / 2
horizontalAlignment: Text.AlignHCenter
font.pixelSize: 15
- text: gesturerect.count1
- visible: sensorGuesture.enabled
+ text: gestureRect.count1
+ visible: sensorGesture.enabled
}
Button{
id: gestureStartStopButton
- anchors.left: gesturerect.left
- anchors.bottom: gesturerect.bottom
+ anchors.left: gestureRect.left
+ anchors.bottom: gestureRect.bottom
height: 30
width: 100
- buttonText: (sensorGuesture.enabled ? "Stop" : "Start")
+ buttonText: (sensorGesture.enabled ? "Stop" : "Start")
enabled: true;
onClicked: {
if (gestureStartStopButton.buttonText === "Start") {
- sensorGuesture.enabled = true;
+ sensorGesture.enabled = true;
}
else {
- sensorGuesture.enabled = false;
+ sensorGesture.enabled = false;
}
}
}
diff --git a/examples/sensors/qmlsensorgestures/doc/src/qmlsensorgtestures.qdoc b/examples/sensors/qmlsensorgestures/doc/src/qmlsensorgestures.qdoc
index 83f3171d..6d810711 100644
--- a/examples/sensors/qmlsensorgestures/doc/src/qmlsensorgtestures.qdoc
+++ b/examples/sensors/qmlsensorgestures/doc/src/qmlsensorgestures.qdoc
@@ -30,34 +30,39 @@
\title Qt Sensors - SensorGesture QML Type example
\ingroup qtsensors-examples
- \brief This example demonstrates use of the SensorGesture QML type.
+ \brief Demonstrates the use of SensorGesture QML type.
-\section1 Overview
- To write a QML application that will use the gesture plugin you need to to the following steps:
+ \section1 Overview
+ To write a QML application that will use the gesture plugin, following
+ steps are needed:
- Import the QtSensors 5.x declarative plugin:
+ Import the QtSensors 5.x module:
-\snippet qmlsensorgestures/GestureView.qml 0
+ \snippet qmlsensorgestures/GestureView.qml 0
- Add the SensorGesture QML type into your qml file.
+ Add the SensorGesture QML type into your qml file.
-\snippet qmlsensorgestures/GestureView.qml 1
+ \snippet qmlsensorgestures/GestureView.qml 1
- Each SensorGesture QML type contains a property called gestures.
+ Each SensorGesture QML type contains a property called gestures. This example
+ uses an alias \c gestureId for this property.
- In this example an alias 'gestureid' for this property is used.
+ \snippet qmlsensorgestures/GestureView.qml 2
-\snippet qmlsensorgestures/GestureView.qml 2
+ Then, the gesture or gestures to use can be specified using the alias:
- By using this alias property you define which gestures should be used:
+ \snippet qmlsensorgestures/qmlsensorgestures.qml 3
+ \dots 12
+ \snippet qmlsensorgestures/qmlsensorgestures.qml 4
-\snippet qmlsensorgestures/qmlsensorgestures.qml 3
+ A list of all available gestures is accessible through the
+ \c availableGestures property:
- A list of all available gestures can be created by calling the 'availableGestures' property:
+ \snippet qmlsensorgestures/GestureList.qml 4
+ \codeline
+ \snippet qmlsensorgestures/GestureList.qml 5
+ \dots 12
+ \snippet qmlsensorgestures/GestureList.qml 6
-\snippet qmlsensorgestures/GestureList.qml 4
-
-\sa {Qt Sensors - ShakeIt QML Example}
-\sa {Qt Sensor Gestures}
+ \sa {Qt Sensors - ShakeIt QML Example}, {Qt Sensor Gestures}
*/
-
diff --git a/examples/sensors/qmlsensorgestures/qmlsensorgestures.qml b/examples/sensors/qmlsensorgestures/qmlsensorgestures.qml
index af1f04a7..60a598e0 100644
--- a/examples/sensors/qmlsensorgestures/qmlsensorgestures.qml
+++ b/examples/sensors/qmlsensorgestures/qmlsensorgestures.qml
@@ -89,10 +89,12 @@ Rectangle {
//! [3]
onSelectedGestureChanged: {
gesture.enabled = false;
- gesture.gestureid = gestureList.selectedGesture;
+ gesture.gestureId = gestureList.selectedGesture;
//! [3]
- gesture.gesturetitle = gestureList.selectedGesture;
+ gesture.gestureTitle = gestureList.selectedGesture;
+//! [4]
}
+//! [4]
}
GestureView {
diff --git a/src/plugins/sensors/blackberry/bbmagnetometer.cpp b/src/plugins/sensors/blackberry/bbmagnetometer.cpp
index a58dfe91..19619d6a 100644
--- a/src/plugins/sensors/blackberry/bbmagnetometer.cpp
+++ b/src/plugins/sensors/blackberry/bbmagnetometer.cpp
@@ -55,39 +55,22 @@ bool BbMagnetometer::updateReadingFromEvent(const sensor_event_t &event, QMagnet
{
float x, y, z;
- QMagnetometer * const magnetometer = qobject_cast<QMagnetometer *>(sensor());
- if (magnetometer && magnetometer->returnGeoValues()) {
- switch (event.accuracy) {
- case SENSOR_ACCURACY_UNRELIABLE: reading->setCalibrationLevel(0.0f); break;
- case SENSOR_ACCURACY_LOW: reading->setCalibrationLevel(0.1f); break;
+ switch (event.accuracy) {
+ case SENSOR_ACCURACY_UNRELIABLE: reading->setCalibrationLevel(0.0f); break;
+ case SENSOR_ACCURACY_LOW: reading->setCalibrationLevel(0.1f); break;
- // We determined that MEDIUM should map to 1.0, because existing code samples
- // show users should pop a calibration screen when seeing < 1.0. The MEDIUM accuracy
- // is actually good enough not to require calibration, so we don't want to make it seem
- // like it is required artificially.
- case SENSOR_ACCURACY_MEDIUM: reading->setCalibrationLevel(1.0f); break;
- case SENSOR_ACCURACY_HIGH: reading->setCalibrationLevel(1.0f); break;
- }
-
- x = convertValue(event.motion.dsp.x);
- y = convertValue(event.motion.dsp.y);
- z = convertValue(event.motion.dsp.z);
-
- } else {
- reading->setCalibrationLevel(1.0f);
-
-#ifndef Q_OS_BLACKBERRY_TABLET
- x = convertValue(event.motion.raw.x);
- y = convertValue(event.motion.raw.y);
- z = convertValue(event.motion.raw.z);
-#else
- // Blackberry Tablet OS does not support raw reading values
- x = convertValue(event.motion.dsp.x);
- y = convertValue(event.motion.dsp.y);
- z = convertValue(event.motion.dsp.z);
-#endif
+ // We determined that MEDIUM should map to 1.0, because existing code samples
+ // show users should pop a calibration screen when seeing < 1.0. The MEDIUM accuracy
+ // is actually good enough not to require calibration, so we don't want to make it seem
+ // like it is required artificially.
+ case SENSOR_ACCURACY_MEDIUM: reading->setCalibrationLevel(1.0f); break;
+ case SENSOR_ACCURACY_HIGH: reading->setCalibrationLevel(1.0f); break;
}
+ x = convertValue(event.motion.dsp.x);
+ y = convertValue(event.motion.dsp.y);
+ z = convertValue(event.motion.dsp.z);
+
remapAxes(&x, &y, &z);
reading->setX(x);
reading->setY(y);
diff --git a/src/plugins/sensors/blackberry/bbsensorbackend.cpp b/src/plugins/sensors/blackberry/bbsensorbackend.cpp
index 7822dd86..89f564d3 100644
--- a/src/plugins/sensors/blackberry/bbsensorbackend.cpp
+++ b/src/plugins/sensors/blackberry/bbsensorbackend.cpp
@@ -215,7 +215,8 @@ void BbSensorBackendBase::remapMatrix(const float inputMatrix[], float outputMat
void BbSensorBackendBase::remapAxes(float *x, float *y, float *z)
{
- Q_ASSERT(x && y && z);
+ Q_UNUSED(z);
+ Q_ASSERT(x && y);
if (!isAutoAxisRemappingEnabled() || orientationForRemapping() == 0)
return;
@@ -306,11 +307,6 @@ bool BbSensorBackendBase::isFeatureSupported(QSensor::Feature feature) const
case QSensor::PressureSensorTemperature:
return true;
case QSensor::GeoValues:
-#ifndef Q_OS_BLACKBERRY_TABLET
- return (sensorType() == SENSOR_TYPE_MAGNETOMETER);
-#else
- return false;
-#endif
case QSensor::Reserved:
case QSensor::FieldOfView:
break;
diff --git a/src/sensors/doc/qtsensors.qdocconf b/src/sensors/doc/qtsensors.qdocconf
index af17ad34..3fb33d93 100644
--- a/src/sensors/doc/qtsensors.qdocconf
+++ b/src/sensors/doc/qtsensors.qdocconf
@@ -3,7 +3,7 @@ include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
project = QtSensors
description = Qt Sensors Reference Documentation
-url = http://qt-project.org/doc/qt-$QT_VER/qtsensors
+url = http://qt-project.org/doc/qt-$QT_VER
version = $QT_VERSION
qhp.projects = QtSensors
diff --git a/src/sensors/doc/src/compatmap.qdoc b/src/sensors/doc/src/compatmap.qdoc
index e3a35304..a287a827 100644
--- a/src/sensors/doc/src/compatmap.qdoc
+++ b/src/sensors/doc/src/compatmap.qdoc
@@ -219,11 +219,11 @@
1) Support depends on the underlying platform
- In addition to the table above, each sensor type might support specific features. For example
+ In addition to the table above, each sensor type might support specific features. For example,
a magnetometer might support returning geo values. See QSensor::isFeatureSupported() for
additional details.
- Sensor Gestures are mostly platform independent, and will run if the platform has the needed sensors.
+ Sensor Gestures are mostly platform independent, and will run if the platform has the sensors required.
Whether they are supported and work well or not depends on the platform.
*/
diff --git a/src/sensors/doc/src/genericbackend.qdoc b/src/sensors/doc/src/genericbackend.qdoc
index a273352b..aa0e5a77 100644
--- a/src/sensors/doc/src/genericbackend.qdoc
+++ b/src/sensors/doc/src/genericbackend.qdoc
@@ -53,6 +53,6 @@
\li Tilt Sensor
\li Accelerometer
\endtable
- If a platform doesn't support the source sensor, then the sensor can not be emulated.
+ If a platform doesn't support the source sensor, then the sensor cannot be emulated.
*/
diff --git a/src/sensors/doc/src/porting.qdoc b/src/sensors/doc/src/porting.qdoc
index 0d5b5723..a96231d8 100644
--- a/src/sensors/doc/src/porting.qdoc
+++ b/src/sensors/doc/src/porting.qdoc
@@ -28,6 +28,8 @@
/*!
\page qtsensors-porting.html
\title Porting Applications from QtMobility Sensors to Qt Sensors
+ \brief Explain how to port from QtMobility Sensors to Qt Sensors
+ \since Qt 5.1
\tableofcontents
@@ -35,22 +37,22 @@
The initial release of Qt Sensors (5.0) is generally expected to be source
compatible with QtMobility Sensors 1.2. This document attempts to explain
- where things must be changed in order to port applications to Qt Sensors.
+ where things need to be changed in order to port applications to Qt Sensors.
\section1 QML
- In QtMobility, the C++ classes like QAccelerometer were directly used as QML types.
+ In \c QtMobility, the C++ classes like \c QAccelerometer were directly used as QML types.
In Qt Sensors, there are now separate classes for the QML types, which have no public
C++ API.
The new QML types in Qt Sensors fix some issues the former QtMobility QML types had,
for example:
\list
- \li The reading types now have proper change notifications
- \li \c availableDataRates and \c outputRanges of the \c Sensor type are now proper list types
- \li The \c identifier and \c type properties of \c Sensor can now be used
- \li The \c lux property of \c LightSensorReading has been renamed to \c illuminance
- \li The \c QmlSensors singleton now allows to query for sensor types
+ \li The reading types now have proper change notifications.
+ \li \c availableDataRates and \c outputRanges of the \c Sensor type are now proper list types.
+ \li The \c identifier and \c type properties of \c Sensor can now be used.
+ \li The \c lux property of \c LightSensorReading has been renamed to \c illuminance.
+ \li The \c QmlSensors singleton now allows to query for sensor types.
\endlist
For more information, see the \l {Qt Sensors QML Types}{QML API} documentation.
@@ -114,7 +116,8 @@
MOBILITY += sensors
\endcode
- Applications should remove these lines and instead use this to enable the Qt Sensors API.
+ Applications should remove these lines and instead use the following statement to enable
+ the Qt Sensors API:
\code
QT += sensors
diff --git a/src/sensors/doc/src/qtsensorgestures-cpp.qdoc b/src/sensors/doc/src/qtsensorgestures-cpp.qdoc
index 70aa3e61..3ffbb5a7 100644
--- a/src/sensors/doc/src/qtsensorgestures-cpp.qdoc
+++ b/src/sensors/doc/src/qtsensorgestures-cpp.qdoc
@@ -28,22 +28,24 @@
/*!
\page qtsensorgestures-cpp.html
\title Sensor Gestures C++ Overview
-\brief Information about the QtSensorGestures C++ API
+\brief Explains how to use the QtSensorGestures C++ API
\tableofcontents
\section1 Using QtSensorGestures
With the Sensor Gestures classes, you are able to easily utilize device gesturing using
-sensors such as the accelerometer and proximity.
+sensors, such as the accelerometer and proximity.
A list of currently supported sensor gestures and their descriptions can be found here:
\l {Qt Sensor Gestures}
-Using QtSensorGestures is easy. There are two main classes you will need to use.
+Using \c QtSensorGestures is easy. There are two main classes you will need to use:
-QSensorGestureManager can be used for determining what sensor gestures are available, and
-QSensorGesture for connecting the sensor gesture signals.
+\list
+ \li QSensorGestureManager: can be used for determining which sensor gestures are available.
+ \li QSensorGesture : for connecting the sensor gesture signals.
+\endlist
\snippet sensorgestures/creating.cpp Receiving sensor gesture signals
@@ -52,15 +54,15 @@ More information about the sensor gesture recognizers can be found in
\section1 Main Classes
-The primary classes that make up the QtSensorGestures API.
+The primary classes that make up the QtSensorGestures API:
\annotatedlist sensorgestures_main
-The primary classes that make up the QtSensorGesturesRecognizers API.
+The primary classes that make up the \c QtSensorGesturesRecognizers API:
\annotatedlist sensorgestures_recognizer
-Details of the QSensorGesturePlugins available
+Details of the \c QSensorGesturePlugins available
\annotatedlist sensorgesture_plugins_topics
diff --git a/src/sensors/doc/src/qtsensorgestures-emulator.qdoc b/src/sensors/doc/src/qtsensorgestures-emulator.qdoc
index af061e2a..ca10035f 100644
--- a/src/sensors/doc/src/qtsensorgestures-emulator.qdoc
+++ b/src/sensors/doc/src/qtsensorgestures-emulator.qdoc
@@ -27,25 +27,23 @@
/*!
\group sensorgesture_emulator_topics
\title QtSensorGestures Emulator
-\brief Information about the development of clients and recognizer plugins
- using QtSensorGestures
+\brief Explains how to develop clients and recognizer plugins using QtSensorGestures
\section1 Overview
-Whether creating client apps using Qt's built-in sensor gestures, or
-creating customized recognizers, the Emulator can be used to help develop client
-apps and recognizers.
+The Emulator can be used for both creating client apps using Qt's built-in sensor gestures,
+and for creating customized recognizers.
\section1 Developing sensor gesture clients.
For instance, the Emulator can be used for writing a client app that needs
-to use the 'slam' gesture.
+to use the "slam" gesture.
-Under the 'Sensors' heading in the Emulator control, you will see an edit
-box for 'Sensor gestures' that will contain a list of signals available
+Under the "Sensors" heading in the Emulator control, you will see an edit
+box for "Sensor gestures" that will contain a list of signals available
when your client instantiates a QSensorGesture.
-Select 'slam', and then click the 'Send' button
+Select "slam", and then click the "Send" button
to send a detected("slam") signal to the client.
*/
diff --git a/src/sensors/doc/src/qtsensorgestures-plugins.qdoc b/src/sensors/doc/src/qtsensorgestures-plugins.qdoc
index 67734aad..ffea1776 100644
--- a/src/sensors/doc/src/qtsensorgestures-plugins.qdoc
+++ b/src/sensors/doc/src/qtsensorgestures-plugins.qdoc
@@ -28,7 +28,7 @@
/*!
\group sensorgesture_plugins_topics
\title QtSensorGestures Plugins
-\brief Information about the QtSensorGestures recognizer plugins.
+\brief Explains how to develop recognizer plugins with QtSensorGestures
The QtSensorGestures recognizer plugins are the way to create your own
sensor gestures.
@@ -36,7 +36,7 @@ sensor gestures.
Creating software to recognize motion gestures using sensors is a huge subject not covered here.
The QSensorGesture API does not limit usage to any of the common classification methods of gesture
-recognition such as Hidden Markov Models, Neural Networks, Dynamic Time Warping, or even the
+recognition, such as Hidden Markov Models, Neural Networks, Dynamic Time Warping, or even the
ad-hoc heuristic recognizers of Qt's built-in sensor gesture recognizers. It's basically a
signaling system for lower level gesture recogition methods and algorithms to communicate to the
higher level applications.
@@ -45,7 +45,7 @@ higher level applications.
\section1 Overview
- The steps to creating a sensor gesture plugin are as follows:
+ The steps for creating a sensor gesture plugin are as follows:
\list
\li Sub-class from QSensorGesturePluginInterface
\li Sub-class from QSensorGestureRecognizer and implement gesture recognizer logic using QtSensors.
@@ -70,34 +70,34 @@ classes to subclass.
\target Qt Sensor Gestures
\section3 Recognizer Plugins
-The Sensor Gesture Recognizers that come with Qt are made using an ad-hock heurustic approach.
+The Sensor Gesture Recognizers that come with Qt are made using an ad-hoc heuristic approach.
The user cannot define their own gestures, and must learn how to perform and accomodate the
pre-defined gestures herein.
-A developer may use any method including computationally and training intensive well
- known classifiers, to produce gesture recognizers. There are currently no classes in Qt for
-gesture training, nor ability for the user to define their own sensor based motion gestures.
+A developer may use any method, including computationally- and training-intensive well-
+known classifiers, to produce gesture recognizers. There are currently no classes in Qt for
+gesture training, nor is it possible for the user to define his own sensor-based motion gestures.
-A procedure for writing ad-hock recognizers might include:
+A procedure for writing ad-hoc recognizers might include:
\list
- \li Obtain and gather output from the accelerometer through QAccelerometerReading of a gesture being performed.
+ \li Obtain and gather output from the accelerometer through \c QAccelerometerReading of a gesture being performed.
\li Use various methods and constraints on the accelerometer data to recognize the various states:
\list i
- \li Initial 'listening' state for a gesture
- \li Start of a possible gesture, moving into a 'detecting' state
- \li End of a possible gesture, moving into a 'recognizing' state
- \li and finally, if it is recognized, the 'recognized' state, or if not recognized, move back to
- the 'listening' state.
+ \li Initial "listening" state for a gesture
+ \li Start of a possible gesture, moving into a "detecting" state
+ \li End of a possible gesture, moving into a "recognizing" state
+ \li and finally, if it is recognized, the "recognized" state, or if not recognized, move back to
+ the "listening" state.
\endlist
\li Test procedure to make sure it is easy to perform, and will not
- produce too many false positive recognitions. And if used with other gestures, collisions. Meaning
+ produce too many false positive recognitions, or collisions if used with other gestures. Meaning
that gestures performed get recognized as another gesture instead.
\endlist
-Here is a list of included plugins and their signals
+Below you will find a list of included plugins and their signals.
-For ShakeGestures plugin:
+For the ShakeGestures plugin:
\table
\row
\li Recognizer Id
@@ -107,7 +107,7 @@ For ShakeGestures plugin:
\li shake
\endtable
-For QtSensorGestures plugin:
+For the QtSensorGestures plugin:
\table
\row
\li Recognizer Id
@@ -133,7 +133,7 @@ For QtSensorGestures plugin:
\row
\li QtSensors.pickup
\li pickup
- \li Phone is resting face up on a flat curface, and is then picked up and brought up into viewing position, using the Accelerometer sensor.
+ \li Phone is resting face up on a flat curface, and is then picked up and brought up into viewing position. Uses the Accelerometer sensor.
\li \image sensorgesture-faceup.png
\row
\li QtSensors.shake2
@@ -144,7 +144,7 @@ For QtSensorGestures plugin:
\li QtSensors.slam
\li slam
\li Phone is held in a top up position with a side facing forward for a moment. Swing it quickly with a downward motion
- like it is being used to point at something with the top corner. using the Accelerometer and Orientation sensors.
+ like it is being used to point at something with the top corner. Uses the Accelerometer and Orientation sensors.
\li \image sensorgesture-slam_1.png
\image sensorgesture-slam_2.png
\row
@@ -160,7 +160,7 @@ For QtSensorGestures plugin:
\row
\li QtSensors.whip
\li whip
- \li Move phone quickly down and then back up. using the Accelerometer and Orientation sensors.
+ \li Move phone quickly down and then back up. Uses the Accelerometer and Orientation sensors.
\li \image sensorgesture-whip.png
\endtable
diff --git a/src/sensors/doc/src/qtsensors-backend.qdoc b/src/sensors/doc/src/qtsensors-backend.qdoc
index da384c38..a64b2d1f 100644
--- a/src/sensors/doc/src/qtsensors-backend.qdoc
+++ b/src/sensors/doc/src/qtsensors-backend.qdoc
@@ -28,9 +28,10 @@
/*!
\group sensors_backend_topics
\title Qt Sensors Backend
-\brief Information about the Qt Sensors back end
+\brief Describes how to use the Qt Sensors backend.
-The Qt Sensors backend connects the Qt Sensors API to the platform services or hardware sensors.
+The Qt Sensors backend connects the Qt Sensors API to the platform services or
+hardware sensors.
\tableofcontents
@@ -39,12 +40,11 @@ The Qt Sensors backend connects the Qt Sensors API to the platform services or h
\section1 Backend API
QSensor instances talk to a backend object. Backends are usually supplied
-with the Qt Sensors library for a specific device although third party
-backends may be used as well. A backend may talk
-directly to hardware or it may talk to a system service. In some instances
-it may even talk to another sensor.
-An example of this is the orientation sensor backend that talks to an
-accelerometer to determine the device orientation.
+with the Qt Sensors library for a specific device, although third-party
+backends may be used as well. A backend can talk directly to hardware, or
+it can talk to a system service. In some instances it can even talk to
+another sensor. An example of this is the orientation sensor backend that talks
+to an accelerometer to determine the device orientation.
\section1 Backend Classes
If you are making sensors available through the Sensors API, these are the
@@ -96,42 +96,45 @@ a game these two devices are conceptually the same type.
\section1 Default sensor for a type
-To avoid the need to know (or check) what the default sensor for a type is, the system will
-use the default sensor for a type. Most of the time this is what the app developer wants to
-do. In cases where the app developer wants to select a specific sensor they must call the
-QSensor::setIdentifier() method before they start the sensor so that the appropriate backend
-is used.
+To avoid the need to know (or check) what the default sensor for a type is, the
+system will use the default sensor for a type. Most of the time this is what the
+app developer wants to do. If the app developer wants to select a specific sensor,
+he needs to call the QSensor::setIdentifier() method before starting the sensor
+so that the appropriate backend is used.
-From a system perspective though, selecting which sensor should be the default gets tricky.
-The sensors library uses the first registered identifier as the default. This means that the
-order in which sensor backends are registered is important so the system will allow a config
-file to determine the default instead.
+From a system perspective though, selecting which sensor should be the default
+gets tricky. The sensors library uses the first registered identifier as the
+default. This means that the order in which the sensor backends are registered,
+is important so the system will allow a config file to determine the default
+instead.
\section1 Sensors.conf
-The config file that determines the default sensor for a type is called Sensors.conf. If present,
-it is located in /etc/xdg/QtProject. It has the standard formatting of an ini file.
+The config file that determines the default sensor for a type is called Sensors.conf.
+If present, it is located in /etc/xdg/QtProject. It has the standard formatting
+of an ini file.
The settings live in the Default group and the general format is:
\code
type = identifier
\endcode
-An example Sensors.conf that ensures the N900 accelerometer is used as the default no matter the
-order in which backends were registered is presented here.
+An example: Sensors.conf ensures that the N900 accelerometer is used by default,
+not considering the order in which backends were registered.
\code
[Default]
QAccelerometer = n900.accelerometer
\endcode
-If Sensors.conf specifies an identifier that is not registered then the system will fall back to
-the first registered identifier as the default.
+If Sensors.conf specifies an identifier that is not registered, the system will
+fall back to the first registered identifier as the default.
-Note that there is special case logic to prevent the generic plugin's backends from becoming the
-default when another backend is registered for the same type. This logic means that a backend
-identifier starting with \c{generic.} will only be the default if no other backends have been
-registered for that type or if it is specified in \c{Sensors.conf}.
+Note that there is a special case logic to prevent the generic plugin's backends
+from becoming the default when another backend is registered for the same type.
+This logic means that a backend identifier starting with \c{generic.} will only
+be the default if no other backends have been registered for that type, or if
+it is specified in \c{Sensors.conf}.
*/
@@ -142,43 +145,46 @@ registered for that type or if it is specified in \c{Sensors.conf}.
\section1 Static Backend Registration
-Sensor backends are generally registered statically. The registration happens when the sensors
-library is first used and the registration remains in effect while the program runs.
+Sensor backends are generally registered statically. The registration happens
+when the sensors library is first used and the registration remains in effect
+while the program runs.
\image sensors-static.png
Statically registered backends may still exhibit some dynamic behaviour as the
-QSensorBackendFactory is free to return 0 to indicate that a backend cannot be created.
+QSensorBackendFactory is free to return 0 to indicate that a backend cannot be
+created.
\section1 Dynamic Backend Registration
-While static registration is fine for most backends there are some situations where this is
-problematic.
+Although static registration is fine for most backends, there are some situations
+where this is problematic.
-The clearest example is backends that represent non-fixed hardware. As an example, lets consider
-a game controller that is connected via Bluetooth. As there may be more than one game controller
-in range of the phone, the program wants to record that a specific game controller should be used.
-If the backend had been registered statically there would have been no unique information about
-the controller. Instead, the registration is delayed until the controller is seen.
+The clearest example is backends that represent non-fixed hardware. For example,
+a game controller that is connected via Bluetooth. As there may be more than one
+game controller in range of the phone, the program wants to record that a specific
+game controller should be used. If the backend had been registered statically
+there would have been no unique information about the controller. Instead, the
+registration is delayed until the controller is seen.
\image sensors-dynamic.png
\section1 Suggested Registration Policy
-A backend for fixed hardware should be registered immediately. Applications can see that the
-sensor can be used.
+A backend for fixed hardware should be registered immediately. Applications can
+see that the sensor can be used.
-A backend for remote hardware should not be registered immediately. Applications can see that
-the sensor cannot be used. When the remote hardware becomes available the backend should be
-registered. Applications can see that the sensor is now available.
+A backend for remote hardware should not be registered immediately. Applications
+can see that the sensor cannot be used. When the remote hardware becomes available,
+the backend should be registered. Applications can see that the sensor is available now.
-If it is necessary to return 0 from a factory for a backend that was registered, the backend
-should be unregistered. Applications can see that the sensor is no longer available. If the
-factory can create the backend again it should be registered. Applications can see that the
-sensor is available again.
+If it is necessary to return 0 from a factory for a backend that was registered,
+the backend should be unregistered. Applications can see that the sensor is no
+longer available. If the factory can create the backend again, it should be re-
+gistered. Applications can see that the sensor is available again.
-When the underlying hardware is no longer available, the backend should be deregistered.
-Existing instances of the backend should report error states to the application but should
-handle the situation gracefully.
+When the underlying hardware is no longer available, the backend should be
+unregistered. Existing instances of the backend should report error states to
+the application but should handle the situation gracefully.
*/
diff --git a/src/sensors/doc/src/qtsensors-cpp.qdoc b/src/sensors/doc/src/qtsensors-cpp.qdoc
index 5157ddad..583469ec 100644
--- a/src/sensors/doc/src/qtsensors-cpp.qdoc
+++ b/src/sensors/doc/src/qtsensors-cpp.qdoc
@@ -28,22 +28,22 @@
/*!
\page qtsensors-cpp.html
\title Qt Sensors C++ Overview
-\brief Information about the Qt Sensors C++ API
+\brief Explains how to use the Qt Sensors C++ API.
\tableofcontents
\section1 Sensor Types
-On a device there can be many types of sensors. Not all of the types that the Qt Sensors API
-supports may be available. There may also be types available that are not defined in the
-Qt Sensors API. The types of sensors available on a device is found using the
-\l QSensor::sensorTypes() function.
+On a device there can be many types of sensors. Not all of the types that the Qt
+Sensors API supports may be available. There may also be types available that
+are not defined in the Qt Sensors API. The types of sensors available on a device
+is found using the \l QSensor::sensorTypes() function.
For a list of built-in sensor types, see the \l{Sensor Classes} section below.
\section1 Common Conventions
-Unless otherwise specified, Qt Sensors uses the
+Unless specified otherwise, Qt Sensors uses the
\l{http://en.wikipedia.org/wiki/Cartesian_coordinate_system}{Right Hand Cartesian coordinate system}.
\image sensors-coordinates.jpg
@@ -56,12 +56,12 @@ Where rotation around an axis is used, the rotation shall be expressed as a Righ
\image sensors-coordinates3.jpg
-In general, sensor data is oriented relative to \l QPlatformScreen::nativeOrientation, i.e
-to the top of the device when the device is held in its natural orientation (normally
-when the device logo appears the right side up). If values are to be displayed on
-the screen the values may need to be transformed so that they match the user interface orientation. A sensor
-may define its data as being oriented to the UI. This will be noted in the documentation for the
-sensor.
+In general, sensor data is oriented relative to \l QPlatformScreen::nativeOrientation,
+that is to the top of the device when the device is held in its natural orientation
+(normally when the device logo appears the right side up). If values are to be
+displayed on the screen, the values may need to be transformed so that they match
+the user interface orientation. A sensor may define its data as being oriented
+to the UI. This will be noted in the documentation for the sensor.
\image sensors-sides2.jpg
diff --git a/src/sensors/doc/src/qtsensors.qdoc b/src/sensors/doc/src/qtsensors.qdoc
index 1b818c8b..002ecfed 100644
--- a/src/sensors/doc/src/qtsensors.qdoc
+++ b/src/sensors/doc/src/qtsensors.qdoc
@@ -28,10 +28,11 @@
/*!
\page qtsensors-index.html
\title Qt Sensors
- \brief The Qt Sensors API provides access to sensors via QML and C++ interfaces.
+ \brief Provides access to sensors via QML and C++ interfaces.
+ \since 5.1
The Qt Sensors API provides access to sensor hardware via QML and C++ interfaces.
- The Qt Sensors API also provides motion gesture recognition API for devices.
+ The Qt Sensors API also provides a motion gesture recognition API for devices.
\section1 Information for Application Writers
@@ -49,10 +50,10 @@
\li High-level information on how to use the C++ API.
\row
\li \l {Sensor Gestures C++ Overview}
- \li High-level information specific to sensor gestures.
+ \li High-level information specific to sensor gestures
\row
\li \l {Qt Sensors Examples}{Examples}
- \li Examples demonstrating use of the Qt Sensors APIs
+ \li Examples demonstrating the use of the Qt Sensors APIs
\endtable
\section1 Information for Backend Implementors
diff --git a/src/sensors/doc/src/qtsensors5.qdoc b/src/sensors/doc/src/qtsensors5.qdoc
index 19ee4fb3..a90694c0 100644
--- a/src/sensors/doc/src/qtsensors5.qdoc
+++ b/src/sensors/doc/src/qtsensors5.qdoc
@@ -32,9 +32,9 @@
\ingroup modules
\qtvariable sensors
- \brief The QtSensors module provides classes for reading sensor data.
+ \brief Provides classes for reading sensor data.
- Mobile devices contains sensor hardware that allow detecting changes in various physical
+ Mobile devices contain 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.
@@ -45,7 +45,7 @@
\title Qt Sensors QML Types
\ingroup qmlmodules
- \brief The QtSensors QML module provides types for reading sensor data.
+ \brief Provides types for reading sensor data.
\section1 QML Module API
@@ -72,7 +72,7 @@
\section1 QML Reading types
- The data from a sensor comes through a reading class.
+ The data from a sensor comes via a reading class.
\annotatedlist qml-sensors_reading
*/
diff --git a/src/sensors/doc/src/sensorfwbackend.qdoc b/src/sensors/doc/src/sensorfwbackend.qdoc
index fcfbb5d8..160bc67e 100644
--- a/src/sensors/doc/src/sensorfwbackend.qdoc
+++ b/src/sensors/doc/src/sensorfwbackend.qdoc
@@ -30,10 +30,12 @@
\title Sensorfw Backend
\brief Information about the Sensorfw sensor backend
- The Sensorfw sensor backend requires the Sensorfw and sensor daemon. Sensorfw was originally used in MeeGo, and is available
- from http://meego.gitorious.org/meego-middleware/sensorfw
+ The Sensorfw sensor backend requires the Sensorfw and sensor daemon. Sensorfw
+ was originally used in MeeGo, and is available on :
+ http://meego.gitorious.org/meego-middleware/sensorfw
- To compile the sensorfw backend, you need sensorfw installed and run qmake with CONFIG+=sensorfw
+ To compile the sensorfw backend, you need sensorfw installed and run qmake
+ with CONFIG+=sensorfw
*/