diff options
author | Geir Vattekar <geir.vattekar@digia.com> | 2012-10-04 13:48:23 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-10-12 15:16:15 +0200 |
commit | 9d4d08421acb628e0115b140e54656fc779d13db (patch) | |
tree | eb87c8fbbe0722f70fa536227fa7a311febdea81 | |
parent | 8f624bb5d19edb47fc4803a5eb0d6343de5bbae9 (diff) | |
download | qtsensors-9d4d08421acb628e0115b140e54656fc779d13db.tar.gz |
Doc: Modularized the Qt Sensor Docs
Change-Id: Ie8636ec443f43b1f238342e0f6f7d321e13dce09
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
-rw-r--r-- | examples/sensors/accel/accel.pro | 9 | ||||
-rw-r--r-- | examples/sensors/accel/main.cpp | 77 | ||||
-rw-r--r-- | examples/sensors/accelbubble/doc/src/accelbubble.qdoc (renamed from doc/src/examples/accelbubble.qdoc) | 10 | ||||
-rw-r--r-- | examples/sensors/cubehouse/doc/src/cubehouse.qdoc (renamed from doc/src/examples/cubehouse.qdoc) | 12 | ||||
-rw-r--r-- | examples/sensors/grue/doc/src/grue.qdoc (renamed from doc/src/examples/grue.qdoc) | 14 | ||||
-rw-r--r-- | examples/sensors/maze/doc/src/maze.qdoc (renamed from doc/src/examples/maze.qdoc) | 14 | ||||
-rw-r--r-- | examples/sensors/qmlqtsensors/doc/src/qmlqtsensors.qdoc (renamed from doc/src/examples/qmlqtsensors.qdoc) | 16 | ||||
-rw-r--r-- | examples/sensors/qmlsensorgestures/doc/src/qmlsensorgtestures.qdoc (renamed from doc/src/examples/qmlsensorgtestures.qdoc) | 12 | ||||
-rw-r--r-- | examples/sensors/sensor_explorer/doc/src/sensor_explorer.qdoc (renamed from doc/src/examples/sensor_explorer.qdoc) | 16 | ||||
-rw-r--r-- | examples/sensors/sensorgestures/doc/images/sensorgesturecpp.png (renamed from doc/src/images/sensorgesturecpp.png) | bin | 33013 -> 33013 bytes | |||
-rw-r--r-- | examples/sensors/sensorgestures/doc/src/sensorgestures.qdoc (renamed from doc/src/examples/sensorgestures.qdoc) | 8 | ||||
-rw-r--r-- | examples/sensors/sensors.pro | 2 | ||||
-rw-r--r-- | examples/sensors/shakeit/doc/images/shakeit.png (renamed from doc/src/images/shakeit.png) | bin | 29380 -> 29380 bytes | |||
-rw-r--r-- | examples/sensors/shakeit/doc/src/shakeit.qdoc (renamed from doc/src/examples/shakeit.qdoc) | 12 | ||||
-rw-r--r-- | qtsensors.pro | 5 | ||||
-rw-r--r-- | src/sensors/doc/images/XAngle.gif (renamed from doc/src/images/XAngle.gif) | bin | 46224 -> 46224 bytes | |||
-rw-r--r-- | src/sensors/doc/images/XAngleNegative.gif (renamed from doc/src/images/XAngleNegative.gif) | bin | 38468 -> 38468 bytes | |||
-rw-r--r-- | src/sensors/doc/images/YAngle.gif (renamed from doc/src/images/YAngle.gif) | bin | 44322 -> 44322 bytes | |||
-rw-r--r-- | src/sensors/doc/images/YAngleNegative.gif (renamed from doc/src/images/YAngleNegative.gif) | bin | 39741 -> 39741 bytes | |||
-rw-r--r-- | src/sensors/doc/images/cubehouse.png (renamed from doc/src/images/cubehouse.png) | bin | 39408 -> 39408 bytes | |||
-rw-r--r-- | src/sensors/doc/images/maze.png (renamed from doc/src/images/maze.png) | bin | 215132 -> 215132 bytes | |||
-rw-r--r-- | src/sensors/doc/images/qmlqtsensors.png (renamed from doc/src/images/qmlqtsensors.png) | bin | 82345 -> 82345 bytes | |||
-rw-r--r-- | src/sensors/doc/images/sensorgesture-cover.png (renamed from doc/src/images/sensorgesture-cover.png) | bin | 23183 -> 23183 bytes | |||
-rw-r--r-- | src/sensors/doc/images/sensorgesture-doubletap.png (renamed from doc/src/images/sensorgesture-doubletap.png) | bin | 30073 -> 30073 bytes | |||
-rw-r--r-- | src/sensors/doc/images/sensorgesture-facedown.png (renamed from doc/src/images/sensorgesture-facedown.png) | bin | 17917 -> 17917 bytes | |||
-rw-r--r-- | src/sensors/doc/images/sensorgesture-faceup.png (renamed from doc/src/images/sensorgesture-faceup.png) | bin | 35115 -> 35115 bytes | |||
-rw-r--r-- | src/sensors/doc/images/sensorgesture-flat.png (renamed from doc/src/images/sensorgesture-flat.png) | bin | 21828 -> 21828 bytes | |||
-rw-r--r-- | src/sensors/doc/images/sensorgesture-hover.png (renamed from doc/src/images/sensorgesture-hover.png) | bin | 22512 -> 22512 bytes | |||
-rw-r--r-- | src/sensors/doc/images/sensorgesture-shake.png (renamed from doc/src/images/sensorgesture-shake.png) | bin | 34512 -> 34512 bytes | |||
-rw-r--r-- | src/sensors/doc/images/sensorgesture-slam_1.png (renamed from doc/src/images/sensorgesture-slam_1.png) | bin | 26212 -> 26212 bytes | |||
-rw-r--r-- | src/sensors/doc/images/sensorgesture-slam_2.png (renamed from doc/src/images/sensorgesture-slam_2.png) | bin | 29763 -> 29763 bytes | |||
-rw-r--r-- | src/sensors/doc/images/sensorgesture-twist.png (renamed from doc/src/images/sensorgesture-twist.png) | bin | 29643 -> 29643 bytes | |||
-rw-r--r-- | src/sensors/doc/images/sensorgesture-whip.png (renamed from doc/src/images/sensorgesture-whip.png) | bin | 32058 -> 32058 bytes | |||
-rw-r--r-- | src/sensors/doc/images/sensors-coordinates.jpg (renamed from doc/src/images/sensors-coordinates.jpg) | bin | 43508 -> 43508 bytes | |||
-rw-r--r-- | src/sensors/doc/images/sensors-coordinates2.jpg (renamed from doc/src/images/sensors-coordinates2.jpg) | bin | 58471 -> 58471 bytes | |||
-rw-r--r-- | src/sensors/doc/images/sensors-coordinates3.jpg (renamed from doc/src/images/sensors-coordinates3.jpg) | bin | 47920 -> 47920 bytes | |||
-rw-r--r-- | src/sensors/doc/images/sensors-dynamic.png (renamed from doc/src/images/sensors-dynamic.png) | bin | 34911 -> 34911 bytes | |||
-rw-r--r-- | src/sensors/doc/images/sensors-geo-vs-raw-magnetism.jpg (renamed from doc/src/images/sensors-geo-vs-raw-magnetism.jpg) | bin | 171856 -> 171856 bytes | |||
-rw-r--r-- | src/sensors/doc/images/sensors-orientation.jpg (renamed from doc/src/images/sensors-orientation.jpg) | bin | 39716 -> 39716 bytes | |||
-rw-r--r-- | src/sensors/doc/images/sensors-overview.png (renamed from doc/src/images/sensors-overview.png) | bin | 9670 -> 9670 bytes | |||
-rw-r--r-- | src/sensors/doc/images/sensors-rotation-anim.gif (renamed from doc/src/images/sensors-rotation-anim.gif) | bin | 296580 -> 296580 bytes | |||
-rw-r--r-- | src/sensors/doc/images/sensors-rotation.jpg (renamed from doc/src/images/sensors-rotation.jpg) | bin | 36653 -> 36653 bytes | |||
-rw-r--r-- | src/sensors/doc/images/sensors-rotation2.jpg (renamed from doc/src/images/sensors-rotation2.jpg) | bin | 39953 -> 39953 bytes | |||
-rw-r--r-- | src/sensors/doc/images/sensors-rotation3.jpg (renamed from doc/src/images/sensors-rotation3.jpg) | bin | 31417 -> 31417 bytes | |||
-rw-r--r-- | src/sensors/doc/images/sensors-sides.jpg (renamed from doc/src/images/sensors-sides.jpg) | bin | 48614 -> 48614 bytes | |||
-rw-r--r-- | src/sensors/doc/images/sensors-sides2.jpg (renamed from doc/src/images/sensors-sides2.jpg) | bin | 22706 -> 22706 bytes | |||
-rw-r--r-- | src/sensors/doc/images/sensors-static.png (renamed from doc/src/images/sensors-static.png) | bin | 23472 -> 23472 bytes | |||
-rw-r--r-- | src/sensors/doc/qtsensors.qdocconf | 47 | ||||
-rw-r--r-- | src/sensors/doc/snippets/sensorgestures/creating.cpp (renamed from doc/src/snippets/sensorgestures/creating.cpp) | 0 | ||||
-rw-r--r-- | src/sensors/doc/snippets/sensorgestures/main.cpp (renamed from doc/src/snippets/sensorgestures/main.cpp) | 0 | ||||
-rw-r--r-- | src/sensors/doc/snippets/sensorgestures/myplugin.h (renamed from doc/src/snippets/sensorgestures/myplugin.h) | 0 | ||||
-rw-r--r-- | src/sensors/doc/snippets/sensorgestures/plugin.cpp (renamed from doc/src/snippets/sensorgestures/plugin.cpp) | 0 | ||||
-rw-r--r-- | src/sensors/doc/snippets/sensorgestures/sensorgestures.pro (renamed from doc/src/snippets/sensorgestures/sensorgestures.pro) | 0 | ||||
-rw-r--r-- | src/sensors/doc/snippets/sensors/creating.cpp (renamed from doc/src/snippets/sensors/creating.cpp) | 0 | ||||
-rw-r--r-- | src/sensors/doc/snippets/sensors/main.cpp (renamed from doc/src/snippets/sensors/main.cpp) | 0 | ||||
-rw-r--r-- | src/sensors/doc/snippets/sensors/mybackend.h (renamed from doc/src/snippets/sensors/mybackend.h) | 0 | ||||
-rw-r--r-- | src/sensors/doc/snippets/sensors/plugin.cpp (renamed from doc/src/snippets/sensors/plugin.cpp) | 0 | ||||
-rw-r--r-- | src/sensors/doc/snippets/sensors/sensors.pro (renamed from doc/src/snippets/sensors/sensors.pro) | 0 | ||||
-rw-r--r-- | src/sensors/doc/snippets/sensors/start.cpp (renamed from doc/src/snippets/sensors/start.cpp) | 0 | ||||
-rw-r--r-- | src/sensors/doc/snippets/snippets.pro (renamed from doc/src/snippets/snippets.pro) | 0 | ||||
-rw-r--r-- | src/sensors/doc/src/compatmap.qdoc (renamed from doc/src/compatmap.qdoc) | 0 | ||||
-rw-r--r-- | src/sensors/doc/src/genericbackend.qdoc (renamed from doc/src/genericbackend.qdoc) | 0 | ||||
-rw-r--r-- | src/sensors/doc/src/porting.qdoc (renamed from doc/src/porting.qdoc) | 21 | ||||
-rw-r--r-- | src/sensors/doc/src/qtmobilitysensors1.qdoc (renamed from doc/src/imports/qtsensors5.qdoc) | 17 | ||||
-rw-r--r-- | src/sensors/doc/src/qtsensorgestures-cpp.qdoc (renamed from doc/src/qtsensorgestures-cpp.qdoc) | 10 | ||||
-rw-r--r-- | src/sensors/doc/src/qtsensorgestures-emulator.qdoc (renamed from doc/src/qtsensorgestures-emulator.qdoc) | 0 | ||||
-rw-r--r-- | src/sensors/doc/src/qtsensorgestures-plugins.qdoc (renamed from doc/src/qtsensorgestures-plugins.qdoc) | 2 | ||||
-rw-r--r-- | src/sensors/doc/src/qtsensors-backend.qdoc (renamed from doc/src/qtsensors-backend.qdoc) | 2 | ||||
-rw-r--r-- | src/sensors/doc/src/qtsensors-cpp.qdoc (renamed from doc/src/qtsensors-cpp.qdoc) | 6 | ||||
-rw-r--r-- | src/sensors/doc/src/qtsensors.qdoc (renamed from doc/src/qtsensors.qdoc) | 16 | ||||
-rw-r--r-- | src/sensors/doc/src/qtsensors5.qdoc | 78 | ||||
-rw-r--r-- | src/sensors/doc/src/sensor-examples.qdoc (renamed from doc/src/examples/sensors.qdoc) | 0 | ||||
-rw-r--r-- | src/sensors/gestures/qsensorgesturemanager.cpp | 2 | ||||
-rw-r--r-- | src/sensors/qlightsensor.cpp | 2 | ||||
-rw-r--r-- | src/sensors/qsensor.cpp | 3 | ||||
-rw-r--r-- | src/sensors/qsensorbackend.cpp | 2 | ||||
-rw-r--r-- | src/sensors/sensors.pro | 2 |
77 files changed, 235 insertions, 182 deletions
diff --git a/examples/sensors/accel/accel.pro b/examples/sensors/accel/accel.pro deleted file mode 100644 index 82fa706..0000000 --- a/examples/sensors/accel/accel.pro +++ /dev/null @@ -1,9 +0,0 @@ -TEMPLATE=app -TARGET=accel - -QT=core sensors - -SOURCES=main.cpp - -target.path = $$[QT_INSTALL_EXAMPLES]/qtsensors/accel -INSTALLS += target diff --git a/examples/sensors/accel/main.cpp b/examples/sensors/accel/main.cpp deleted file mode 100644 index 2985536..0000000 --- a/examples/sensors/accel/main.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <QtCore> -#include <qaccelerometer.h> - -QAccelerometer *accelerometer; - -class AccelerometerFilter : public QAccelerometerFilter -{ -public: - bool filter(QAccelerometerReading *reading) - { - qDebug() << "acceleration: " - << QString().sprintf("%0.2f %0.2f %0.2f", - reading->x(), - reading->y(), - reading->z()); - return false; // don't store the reading in the sensor - } -}; - -int main(int argc, char **argv) -{ - QCoreApplication app(argc, argv); - - QAccelerometer sensor; - accelerometer = &sensor; - AccelerometerFilter filter; - sensor.addFilter(&filter); - sensor.start(); - - if (!sensor.isActive()) { - qWarning("Accelerometer didn't start!"); - return 1; - } - - return app.exec(); -} - diff --git a/doc/src/examples/accelbubble.qdoc b/examples/sensors/accelbubble/doc/src/accelbubble.qdoc index 9199b17..83c5d3d 100644 --- a/doc/src/examples/accelbubble.qdoc +++ b/examples/sensors/accelbubble/doc/src/accelbubble.qdoc @@ -26,7 +26,7 @@ ****************************************************************************/ /*! - \example sensors/accelbubble + \example accelbubble \title Qt Sensors - Accel Bubble \brief The AccelBubble example demonstrates the Legacy Accelerometer QML type. \ingroup qtsensors-examples @@ -36,19 +36,19 @@ Import the Legacy Sensors Declarative module. -\snippet ../examples/sensors/accelbubble/accelbubble.qml 0 +\snippet accelbubble/accelbubble.qml 0 Add an Accelerometer QML type. -\snippet ../examples/sensors/accelbubble/accelbubble.qml 1 +\snippet accelbubble/accelbubble.qml 1 Use the 'active' property to start the sensor -\snippet ../examples/sensors/accelbubble/accelbubble.qml 2 +\snippet accelbubble/accelbubble.qml 2 Move the bubble according to a factor of the accelerator sensor -\snippet ../examples/sensors/accelbubble/accelbubble.qml 3 +\snippet accelbubble/accelbubble.qml 3 */ diff --git a/doc/src/examples/cubehouse.qdoc b/examples/sensors/cubehouse/doc/src/cubehouse.qdoc index 37d5fe2..e286e32 100644 --- a/doc/src/examples/cubehouse.qdoc +++ b/examples/sensors/cubehouse/doc/src/cubehouse.qdoc @@ -26,7 +26,7 @@ ****************************************************************************/ /*! - \example sensors/cubehouse + \example cubehouse \title Qt Sensors - Cube House QML Accelerometer example \ingroup qtsensors-examples \brief The Cube House example demonstrates the use of the accelerometer to drive a camera to create a pseudo-3D effect. @@ -37,24 +37,24 @@ Import the QtSensors declarative plugin: -\snippet ../examples/sensors/cubehouse/cubehouse.qml 0 +\snippet cubehouse/cubehouse.qml 0 Add the Accelerometer QML types into your qml file. -\snippet ../examples/sensors/cubehouse/cubehouse.qml 1 +\snippet cubehouse/cubehouse.qml 1 In additional two properties are added to save the calculated pitch and roll values: -\snippet ../examples/sensors/cubehouse/cubehouse.qml 2 +\snippet cubehouse/cubehouse.qml 2 Reading out the Accelerometer data can be done by implementing the 'onReadingChanged' slot and accessing the 'reading' property from the Accelerometer type: -\snippet ../examples/sensors/cubehouse/cubehouse.qml 3 +\snippet cubehouse/cubehouse.qml 3 By using a timer the view can be rotated using the pitch and roll properties from the Accelerometer type: -\snippet ../examples/sensors/cubehouse/cubehouse.qml 4 +\snippet cubehouse/cubehouse.qml 4 */ diff --git a/doc/src/examples/grue.qdoc b/examples/sensors/grue/doc/src/grue.qdoc index 1eed941..9a0d447 100644 --- a/doc/src/examples/grue.qdoc +++ b/examples/sensors/grue/doc/src/grue.qdoc @@ -57,7 +57,7 @@ */ /*! - \example sensors/grue/lib + \example grue/lib \title Grue Sensor Definition \brief The Grue sensor is defined in a library so that applications can use it. @@ -78,7 +78,7 @@ */ /*! - \example sensors/grue/plugin + \example grue/plugin \title Grue Sensor Implementation \brief The Grue sensor implementation lives in a plugin that is loaded by the Qt Sensors library. @@ -94,13 +94,13 @@ light sensor. In the start method, the backend should be sure to call the sensorStopped() or sensorBusy() methods if it cannot start. - \snippet ../examples/sensors/grue/plugin/gruesensorimpl.cpp start + \snippet grue/plugin/gruesensorimpl.cpp start The setReading method is needed so that the sensors library knows where the readings are coming from. This backend has a local copy of the reading so it passes a pointer to the function. - \snippet ../examples/sensors/grue/plugin/gruesensorimpl.cpp setReading + \snippet grue/plugin/gruesensorimpl.cpp setReading However it is also possible to pass null to the setReading method in which case the sensors library will create an instance and return a pointer. @@ -123,7 +123,7 @@ */ /*! - \example sensors/grue/console_app + \example grue/console_app \title Grue Sensor Console Application \brief The Grue sensor console application demonstrates use of the Grue sensor. @@ -135,7 +135,7 @@ */ /*! - \example sensors/grue/import + \example grue/import \title Grue Sensor QML Import \brief The Grue sensor QML import exports the GrueSensor class as a QML type. @@ -145,7 +145,7 @@ */ /*! - \example sensors/grue + \example grue \title Grue Sensor QML Application \brief The Grue sensor QML application demonstrates use of the GrueSensor QML type. diff --git a/doc/src/examples/maze.qdoc b/examples/sensors/maze/doc/src/maze.qdoc index e180728..d9b50be 100644 --- a/doc/src/examples/maze.qdoc +++ b/examples/sensors/maze/doc/src/maze.qdoc @@ -26,7 +26,7 @@ ****************************************************************************/ /*! - \example sensors/maze + \example maze \title Qt Sensors - Maze QML Example \ingroup qtsensors-examples \image maze.png @@ -39,29 +39,29 @@ Import the QtSensors 5.x declarative plugin: - \snippet ../examples/sensors/maze/maze.qml 0 + \snippet maze/maze.qml 0 Add the Sensor QML types into your qml file. In this example we use the TiltSensor with values based in degrees and an accuracy of 5 degree: - \snippet ../examples/sensors/maze/maze.qml 1 + \snippet maze/maze.qml 1 Starting the sensor can be done by setting the 'enabled' property to true: - \snippet ../examples/sensors/maze/maze.qml 2 + \snippet maze/maze.qml 2 The mouse should move by a factor of the tilt value: - \snippet ../examples/sensors/maze/maze.qml 3 + \snippet maze/maze.qml 3 The walk direction of the mouse takes into account some collision detection: - \snippet ../examples/sensors/maze/maze.qml 4 + \snippet maze/maze.qml 4 The rotation of the mouse image is determined according to the angle that the mouse is moving. - \snippet ../examples/sensors/maze/Mouse.qml 0 + \snippet maze/Mouse.qml 0 */ diff --git a/doc/src/examples/qmlqtsensors.qdoc b/examples/sensors/qmlqtsensors/doc/src/qmlqtsensors.qdoc index ed6c99f..f6b4738 100644 --- a/doc/src/examples/qmlqtsensors.qdoc +++ b/examples/sensors/qmlqtsensors/doc/src/qmlqtsensors.qdoc @@ -26,7 +26,7 @@ ****************************************************************************/ /*! - \example sensors/qmlqtsensors + \example qmlqtsensors \title Qt Sensors - QML example \ingroup qtsensors-examples \image qmlqtsensors.png @@ -39,32 +39,32 @@ Import the QtSensors 5.x declarative plugin: - \snippet ../examples/sensors/qmlqtsensors/qmlqtsensors.qml 0 + \snippet qmlqtsensors/qmlqtsensors.qml 0 Add the Sensor QML types into your qml file. In this example we use the TiltSensor: - \snippet ../examples/sensors/qmlqtsensors/qmlqtsensors.qml 1 + \snippet qmlqtsensors/qmlqtsensors.qml 1 The Tilt-, AmbientLight- and the Proximity QML sensor types have the 'enabled' property in common. To start or stop the sensor set this property to true or false. - \snippet ../examples/sensors/qmlqtsensors/qmlqtsensors.qml 2 + \snippet qmlqtsensors/qmlqtsensors.qml 2 Reading the data can be done for each sensor type like following: \l {QtSensors::TiltSensor} {TiltSensor} - \snippet ../examples/sensors/qmlqtsensors/qmlqtsensors.qml 3 - \snippet ../examples/sensors/qmlqtsensors/qmlqtsensors.qml 4 + \snippet qmlqtsensors/qmlqtsensors.qml 3 + \snippet qmlqtsensors/qmlqtsensors.qml 4 \l {QtSensors::AmbientLightSensor} {AmbientLightSensor} - \snippet ../examples/sensors/qmlqtsensors/qmlqtsensors.qml 5 + \snippet qmlqtsensors/qmlqtsensors.qml 5 \l {QtSensors::ProximitySensor} {ProximitySensor} - \snippet ../examples/sensors/qmlqtsensors/qmlqtsensors.qml 6 + \snippet qmlqtsensors/qmlqtsensors.qml 6 */ diff --git a/doc/src/examples/qmlsensorgtestures.qdoc b/examples/sensors/qmlsensorgestures/doc/src/qmlsensorgtestures.qdoc index 74e65ae..83f3171 100644 --- a/doc/src/examples/qmlsensorgtestures.qdoc +++ b/examples/sensors/qmlsensorgestures/doc/src/qmlsensorgtestures.qdoc @@ -26,7 +26,7 @@ ****************************************************************************/ /*! - \example sensors/qmlsensorgestures + \example qmlsensorgestures \title Qt Sensors - SensorGesture QML Type example \ingroup qtsensors-examples @@ -37,25 +37,25 @@ Import the QtSensors 5.x declarative plugin: -\snippet ../examples/sensors/qmlsensorgestures/GestureView.qml 0 +\snippet qmlsensorgestures/GestureView.qml 0 Add the SensorGesture QML type into your qml file. -\snippet ../examples/sensors/qmlsensorgestures/GestureView.qml 1 +\snippet qmlsensorgestures/GestureView.qml 1 Each SensorGesture QML type contains a property called gestures. In this example an alias 'gestureid' for this property is used. -\snippet ../examples/sensors/qmlsensorgestures/GestureView.qml 2 +\snippet qmlsensorgestures/GestureView.qml 2 By using this alias property you define which gestures should be used: -\snippet ../examples/sensors/qmlsensorgestures/qmlsensorgestures.qml 3 +\snippet qmlsensorgestures/qmlsensorgestures.qml 3 A list of all available gestures can be created by calling the 'availableGestures' property: -\snippet ../examples/sensors/qmlsensorgestures/GestureList.qml 4 +\snippet qmlsensorgestures/GestureList.qml 4 \sa {Qt Sensors - ShakeIt QML Example} \sa {Qt Sensor Gestures} diff --git a/doc/src/examples/sensor_explorer.qdoc b/examples/sensors/sensor_explorer/doc/src/sensor_explorer.qdoc index 92879c2..be04215 100644 --- a/doc/src/examples/sensor_explorer.qdoc +++ b/examples/sensors/sensor_explorer/doc/src/sensor_explorer.qdoc @@ -26,7 +26,7 @@ ****************************************************************************/ /*! - \example sensors/sensor_explorer + \example sensor_explorer \title Qt Sensors - Explorer QML example \ingroup qtsensors-examples @@ -54,31 +54,31 @@ Import the Explorer 1.0 declarative plugin: - \snippet ../examples/sensors/sensor_explorer/sensor_explorer.qml 0 + \snippet sensor_explorer/sensor_explorer.qml 0 Create a SensorExplorer QML item: - \snippet ../examples/sensors/sensor_explorer/sensor_explorer.qml 1 + \snippet sensor_explorer/sensor_explorer.qml 1 You can retrieve a list of all available sensors using the SensorExplorer: - \snippet ../examples/sensors/sensor_explorer/sensor_explorer.qml 2 + \snippet sensor_explorer/sensor_explorer.qml 2 To retrieve the properties of a SensorItem use: - \snippet ../examples/sensors/sensor_explorer/sensor_explorer.qml 3 + \snippet sensor_explorer/sensor_explorer.qml 3 Changing a property value can be done like: - \snippet ../examples/sensors/sensor_explorer/sensor_explorer.qml 4 + \snippet sensor_explorer/sensor_explorer.qml 4 Starting and stopping a sensor can be done like: - \snippet ../examples/sensors/sensor_explorer/sensor_explorer.qml 5 + \snippet sensor_explorer/sensor_explorer.qml 5 */ /*! - \example sensors/sensor_explorer/import + \example sensor_explorer/import \title Sensor Explorer QML Import \section2 Sensor Explorer Declarative Plugin diff --git a/doc/src/images/sensorgesturecpp.png b/examples/sensors/sensorgestures/doc/images/sensorgesturecpp.png Binary files differindex 4d453cf..4d453cf 100644 --- a/doc/src/images/sensorgesturecpp.png +++ b/examples/sensors/sensorgestures/doc/images/sensorgesturecpp.png diff --git a/doc/src/examples/sensorgestures.qdoc b/examples/sensors/sensorgestures/doc/src/sensorgestures.qdoc index d34f383..a5c96cb 100644 --- a/doc/src/examples/sensorgestures.qdoc +++ b/examples/sensors/sensorgestures/doc/src/sensorgestures.qdoc @@ -26,7 +26,7 @@ ****************************************************************************/ /*! - \page sensorgestureexample.html + \example sensorgestures \title Qt Sensors - C++ Sensor Gestures Example \ingroup qtsensors-examples \brief The sensor gesture example demonstrates the steps for creating a C++ application @@ -45,17 +45,17 @@ In order to know about custom signals that may be available, we need to ask the QSensorGestureManager about them, Using the QSensorGesture::gestureIds() function, the manager will return a QStringList of known and valid gesture Ids. - \snippet ../examples/sensors/sensorgestures/mainwindow.cpp 0 + \snippet sensorgestures/mainwindow.cpp 0 We can then use this to create a QSensorGesture object that we can use to connect signals to, and start the detection process. A QSensorGesture object will take a list of one or more recognizer ids in it's constructor. - \snippet ../examples/sensors/sensorgestures/mainwindow.cpp 1 + \snippet sensorgestures/mainwindow.cpp 1 and later stop the detection process. - \snippet ../examples/sensors/sensorgestures/mainwindow.cpp 2 + \snippet sensorgestures/mainwindow.cpp 2 The QSensorGesture object will contain all the signals of the valid requested recognizers found on the system. diff --git a/examples/sensors/sensors.pro b/examples/sensors/sensors.pro index 7fe9a09..f98b4c1 100644 --- a/examples/sensors/sensors.pro +++ b/examples/sensors/sensors.pro @@ -1,6 +1,6 @@ TEMPLATE = subdirs -SUBDIRS += accel grue +SUBDIRS += grue !isEmpty(QT.quick.name) { SUBDIRS += \ diff --git a/doc/src/images/shakeit.png b/examples/sensors/shakeit/doc/images/shakeit.png Binary files differindex 5ca1b58..5ca1b58 100644 --- a/doc/src/images/shakeit.png +++ b/examples/sensors/shakeit/doc/images/shakeit.png diff --git a/doc/src/examples/shakeit.qdoc b/examples/sensors/shakeit/doc/src/shakeit.qdoc index 1dc300f..8f5931f 100644 --- a/doc/src/examples/shakeit.qdoc +++ b/examples/sensors/shakeit/doc/src/shakeit.qdoc @@ -26,7 +26,7 @@ ****************************************************************************/ /*! - \example sensors/shakeit + \example shakeit \title Qt Sensors - ShakeIt QML Example \ingroup qtsensors-examples \image shakeit.png @@ -39,25 +39,25 @@ Import the Sensors Declarative module. - \snippet ../examples/sensors/shakeit/shakeit.qml 0 + \snippet shakeit/shakeit.qml 0 Add a SensorGesture QML type. - \snippet ../examples/sensors/shakeit/shakeit.qml 1 + \snippet shakeit/shakeit.qml 1 In the SensorGesture type, specify which gesture to be used. Note that this can be a comma separated list. Here we are only interested in one gesture recognizer. - \snippet ../examples/sensors/shakeit/shakeit.qml 2 + \snippet shakeit/shakeit.qml 2 Use the 'enabled' property to start the sensor gesture. - \snippet ../examples/sensors/shakeit/shakeit.qml 3 + \snippet shakeit/shakeit.qml 3 Use the onDetected signal to do stuff. - \snippet ../examples/sensors/shakeit/shakeit.qml 4 + \snippet shakeit/shakeit.qml 4 There are additional gestures to shake which are supported: whip, twistRight, hover, cover, turnover and pickup. diff --git a/qtsensors.pro b/qtsensors.pro index e76adec..83d9ebd 100644 --- a/qtsensors.pro +++ b/qtsensors.pro @@ -6,11 +6,6 @@ blackberry { load(qt_parts) -SUBDIRS += module_qtsensors_snippets -module_qtsensors_snippets.subdir = doc/src/snippets -module_qtsensors_snippets.target = sub-snippets -module_qtsensors_snippets.depends = sub_src - # Commands to rebuild the plugin.qmltypes files for our imports # Run "make rebuild_qmltypes" after completing a build sensors_qmltypes.commands = qmlplugindump QtSensors 5.0 $$QT.sensors.imports > $$PWD/src/imports/sensors/plugins.qmltypes diff --git a/doc/src/images/XAngle.gif b/src/sensors/doc/images/XAngle.gif Binary files differindex 045f235..045f235 100644 --- a/doc/src/images/XAngle.gif +++ b/src/sensors/doc/images/XAngle.gif diff --git a/doc/src/images/XAngleNegative.gif b/src/sensors/doc/images/XAngleNegative.gif Binary files differindex 92fc923..92fc923 100644 --- a/doc/src/images/XAngleNegative.gif +++ b/src/sensors/doc/images/XAngleNegative.gif diff --git a/doc/src/images/YAngle.gif b/src/sensors/doc/images/YAngle.gif Binary files differindex 004fdd1..004fdd1 100644 --- a/doc/src/images/YAngle.gif +++ b/src/sensors/doc/images/YAngle.gif diff --git a/doc/src/images/YAngleNegative.gif b/src/sensors/doc/images/YAngleNegative.gif Binary files differindex 1dce653..1dce653 100644 --- a/doc/src/images/YAngleNegative.gif +++ b/src/sensors/doc/images/YAngleNegative.gif diff --git a/doc/src/images/cubehouse.png b/src/sensors/doc/images/cubehouse.png Binary files differindex e3ff7fa..e3ff7fa 100644 --- a/doc/src/images/cubehouse.png +++ b/src/sensors/doc/images/cubehouse.png diff --git a/doc/src/images/maze.png b/src/sensors/doc/images/maze.png Binary files differindex f3ad8de..f3ad8de 100644 --- a/doc/src/images/maze.png +++ b/src/sensors/doc/images/maze.png diff --git a/doc/src/images/qmlqtsensors.png b/src/sensors/doc/images/qmlqtsensors.png Binary files differindex 0a54b65..0a54b65 100644 --- a/doc/src/images/qmlqtsensors.png +++ b/src/sensors/doc/images/qmlqtsensors.png diff --git a/doc/src/images/sensorgesture-cover.png b/src/sensors/doc/images/sensorgesture-cover.png Binary files differindex 7b4fbc5..7b4fbc5 100644 --- a/doc/src/images/sensorgesture-cover.png +++ b/src/sensors/doc/images/sensorgesture-cover.png diff --git a/doc/src/images/sensorgesture-doubletap.png b/src/sensors/doc/images/sensorgesture-doubletap.png Binary files differindex 6253d0f..6253d0f 100644 --- a/doc/src/images/sensorgesture-doubletap.png +++ b/src/sensors/doc/images/sensorgesture-doubletap.png diff --git a/doc/src/images/sensorgesture-facedown.png b/src/sensors/doc/images/sensorgesture-facedown.png Binary files differindex a85664f..a85664f 100644 --- a/doc/src/images/sensorgesture-facedown.png +++ b/src/sensors/doc/images/sensorgesture-facedown.png diff --git a/doc/src/images/sensorgesture-faceup.png b/src/sensors/doc/images/sensorgesture-faceup.png Binary files differindex c20ef08..c20ef08 100644 --- a/doc/src/images/sensorgesture-faceup.png +++ b/src/sensors/doc/images/sensorgesture-faceup.png diff --git a/doc/src/images/sensorgesture-flat.png b/src/sensors/doc/images/sensorgesture-flat.png Binary files differindex e8eafaf..e8eafaf 100644 --- a/doc/src/images/sensorgesture-flat.png +++ b/src/sensors/doc/images/sensorgesture-flat.png diff --git a/doc/src/images/sensorgesture-hover.png b/src/sensors/doc/images/sensorgesture-hover.png Binary files differindex fecf6b3..fecf6b3 100644 --- a/doc/src/images/sensorgesture-hover.png +++ b/src/sensors/doc/images/sensorgesture-hover.png diff --git a/doc/src/images/sensorgesture-shake.png b/src/sensors/doc/images/sensorgesture-shake.png Binary files differindex 06f9eea..06f9eea 100644 --- a/doc/src/images/sensorgesture-shake.png +++ b/src/sensors/doc/images/sensorgesture-shake.png diff --git a/doc/src/images/sensorgesture-slam_1.png b/src/sensors/doc/images/sensorgesture-slam_1.png Binary files differindex d56f889..d56f889 100644 --- a/doc/src/images/sensorgesture-slam_1.png +++ b/src/sensors/doc/images/sensorgesture-slam_1.png diff --git a/doc/src/images/sensorgesture-slam_2.png b/src/sensors/doc/images/sensorgesture-slam_2.png Binary files differindex 5fe8ecb..5fe8ecb 100644 --- a/doc/src/images/sensorgesture-slam_2.png +++ b/src/sensors/doc/images/sensorgesture-slam_2.png diff --git a/doc/src/images/sensorgesture-twist.png b/src/sensors/doc/images/sensorgesture-twist.png Binary files differindex bec1585..bec1585 100644 --- a/doc/src/images/sensorgesture-twist.png +++ b/src/sensors/doc/images/sensorgesture-twist.png diff --git a/doc/src/images/sensorgesture-whip.png b/src/sensors/doc/images/sensorgesture-whip.png Binary files differindex aa998bb..aa998bb 100644 --- a/doc/src/images/sensorgesture-whip.png +++ b/src/sensors/doc/images/sensorgesture-whip.png diff --git a/doc/src/images/sensors-coordinates.jpg b/src/sensors/doc/images/sensors-coordinates.jpg Binary files differindex e2e9890..e2e9890 100644 --- a/doc/src/images/sensors-coordinates.jpg +++ b/src/sensors/doc/images/sensors-coordinates.jpg diff --git a/doc/src/images/sensors-coordinates2.jpg b/src/sensors/doc/images/sensors-coordinates2.jpg Binary files differindex 8dd43a2..8dd43a2 100644 --- a/doc/src/images/sensors-coordinates2.jpg +++ b/src/sensors/doc/images/sensors-coordinates2.jpg diff --git a/doc/src/images/sensors-coordinates3.jpg b/src/sensors/doc/images/sensors-coordinates3.jpg Binary files differindex 0263400..0263400 100644 --- a/doc/src/images/sensors-coordinates3.jpg +++ b/src/sensors/doc/images/sensors-coordinates3.jpg diff --git a/doc/src/images/sensors-dynamic.png b/src/sensors/doc/images/sensors-dynamic.png Binary files differindex d2ba937..d2ba937 100644 --- a/doc/src/images/sensors-dynamic.png +++ b/src/sensors/doc/images/sensors-dynamic.png diff --git a/doc/src/images/sensors-geo-vs-raw-magnetism.jpg b/src/sensors/doc/images/sensors-geo-vs-raw-magnetism.jpg Binary files differindex 272fa31..272fa31 100644 --- a/doc/src/images/sensors-geo-vs-raw-magnetism.jpg +++ b/src/sensors/doc/images/sensors-geo-vs-raw-magnetism.jpg diff --git a/doc/src/images/sensors-orientation.jpg b/src/sensors/doc/images/sensors-orientation.jpg Binary files differindex 245533d..245533d 100644 --- a/doc/src/images/sensors-orientation.jpg +++ b/src/sensors/doc/images/sensors-orientation.jpg diff --git a/doc/src/images/sensors-overview.png b/src/sensors/doc/images/sensors-overview.png Binary files differindex 29e9ebd..29e9ebd 100644 --- a/doc/src/images/sensors-overview.png +++ b/src/sensors/doc/images/sensors-overview.png diff --git a/doc/src/images/sensors-rotation-anim.gif b/src/sensors/doc/images/sensors-rotation-anim.gif Binary files differindex 22c678d..22c678d 100644 --- a/doc/src/images/sensors-rotation-anim.gif +++ b/src/sensors/doc/images/sensors-rotation-anim.gif diff --git a/doc/src/images/sensors-rotation.jpg b/src/sensors/doc/images/sensors-rotation.jpg Binary files differindex 1bd1b14..1bd1b14 100644 --- a/doc/src/images/sensors-rotation.jpg +++ b/src/sensors/doc/images/sensors-rotation.jpg diff --git a/doc/src/images/sensors-rotation2.jpg b/src/sensors/doc/images/sensors-rotation2.jpg Binary files differindex 1bf34fe..1bf34fe 100644 --- a/doc/src/images/sensors-rotation2.jpg +++ b/src/sensors/doc/images/sensors-rotation2.jpg diff --git a/doc/src/images/sensors-rotation3.jpg b/src/sensors/doc/images/sensors-rotation3.jpg Binary files differindex d69a3e1..d69a3e1 100644 --- a/doc/src/images/sensors-rotation3.jpg +++ b/src/sensors/doc/images/sensors-rotation3.jpg diff --git a/doc/src/images/sensors-sides.jpg b/src/sensors/doc/images/sensors-sides.jpg Binary files differindex 8e84224..8e84224 100644 --- a/doc/src/images/sensors-sides.jpg +++ b/src/sensors/doc/images/sensors-sides.jpg diff --git a/doc/src/images/sensors-sides2.jpg b/src/sensors/doc/images/sensors-sides2.jpg Binary files differindex db66a9b..db66a9b 100644 --- a/doc/src/images/sensors-sides2.jpg +++ b/src/sensors/doc/images/sensors-sides2.jpg diff --git a/doc/src/images/sensors-static.png b/src/sensors/doc/images/sensors-static.png Binary files differindex 657aaad..657aaad 100644 --- a/doc/src/images/sensors-static.png +++ b/src/sensors/doc/images/sensors-static.png diff --git a/src/sensors/doc/qtsensors.qdocconf b/src/sensors/doc/qtsensors.qdocconf new file mode 100644 index 0000000..c2d27bc --- /dev/null +++ b/src/sensors/doc/qtsensors.qdocconf @@ -0,0 +1,47 @@ +include($QT_INSTALL_DOCS/global/qt-html-templates-offline.qdocconf) +include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf) + +project = QtSensors +description = Qt Contacts Reference Documentation +url = http://qt-project.org/doc/qt-5.0/qtsensors-index.html +version = 5.0.0 + +qhp.projects = QtSensors + +qhp.QtSensors.file = qtsensors.qhp +qhp.QtSensors.namespace = org.qt-project.qtsensors.500 +qhp.QtSensors.virtualFolder = qdoc +qhp.QtSensors.indexTitle = Qt Sensors Reference Documentation +qhp.QtSensors.indexRoot = + +qhp.QtSensors.filterAttributes = qtsensors 5.0.0 qtrefdoc +qhp.QtSensors.customFilters.Qt.name = QtSensors 5.0.0 +qhp.QtSensors.customFilters.Qt.filterAttributes = qtsensors 5.0.0 +qhp.QtSensors.subprojects = classes overviews examples +qhp.QtSensors.subprojects.classes.title = Classes +qhp.QtSensors.subprojects.classes.indexTitle = Qt Sensors's Classes +qhp.QtSensors.subprojects.classes.selectors = class fake:headerfile +qhp.QtSensors.subprojects.classes.sortPages = true +qhp.QtSensors.subprojects.overviews.title = Overviews +qhp.QtSensors.subprojects.overviews.indexTitle = All Overviews and HOWTOs +qhp.QtSensors.subprojects.overviews.selectors = fake:page,group,module +qhp.QtSensors.subprojects.examples.title = Qt Sensors Examples +qhp.QtSensors.subprojects.examples.indexTitle = Qt Sensors Examples +qhp.QtSensors.subprojects.examples.selectors = fake:example + +outputdir = ../../../doc/qtsensors +tagfile = ../../../doc/qtsensors/qtsensors.tags + +headerdirs += .. \ + ../../imports/sensors2 \ + ../../plugins/sensors + +sourcedirs += .. \ + ../../imports/sensors2 \ + ../../plugins/sensors + +exampledirs += ../../../examples/sensors \ + snippets/ + + +imagedirs += images diff --git a/doc/src/snippets/sensorgestures/creating.cpp b/src/sensors/doc/snippets/sensorgestures/creating.cpp index 214f2d4..214f2d4 100644 --- a/doc/src/snippets/sensorgestures/creating.cpp +++ b/src/sensors/doc/snippets/sensorgestures/creating.cpp diff --git a/doc/src/snippets/sensorgestures/main.cpp b/src/sensors/doc/snippets/sensorgestures/main.cpp index 08db48c..08db48c 100644 --- a/doc/src/snippets/sensorgestures/main.cpp +++ b/src/sensors/doc/snippets/sensorgestures/main.cpp diff --git a/doc/src/snippets/sensorgestures/myplugin.h b/src/sensors/doc/snippets/sensorgestures/myplugin.h index d75f3ce..d75f3ce 100644 --- a/doc/src/snippets/sensorgestures/myplugin.h +++ b/src/sensors/doc/snippets/sensorgestures/myplugin.h diff --git a/doc/src/snippets/sensorgestures/plugin.cpp b/src/sensors/doc/snippets/sensorgestures/plugin.cpp index 7798290..7798290 100644 --- a/doc/src/snippets/sensorgestures/plugin.cpp +++ b/src/sensors/doc/snippets/sensorgestures/plugin.cpp diff --git a/doc/src/snippets/sensorgestures/sensorgestures.pro b/src/sensors/doc/snippets/sensorgestures/sensorgestures.pro index 46d6825..46d6825 100644 --- a/doc/src/snippets/sensorgestures/sensorgestures.pro +++ b/src/sensors/doc/snippets/sensorgestures/sensorgestures.pro diff --git a/doc/src/snippets/sensors/creating.cpp b/src/sensors/doc/snippets/sensors/creating.cpp index 01e3e36..01e3e36 100644 --- a/doc/src/snippets/sensors/creating.cpp +++ b/src/sensors/doc/snippets/sensors/creating.cpp diff --git a/doc/src/snippets/sensors/main.cpp b/src/sensors/doc/snippets/sensors/main.cpp index 08db48c..08db48c 100644 --- a/doc/src/snippets/sensors/main.cpp +++ b/src/sensors/doc/snippets/sensors/main.cpp diff --git a/doc/src/snippets/sensors/mybackend.h b/src/sensors/doc/snippets/sensors/mybackend.h index 49d9d3c..49d9d3c 100644 --- a/doc/src/snippets/sensors/mybackend.h +++ b/src/sensors/doc/snippets/sensors/mybackend.h diff --git a/doc/src/snippets/sensors/plugin.cpp b/src/sensors/doc/snippets/sensors/plugin.cpp index e467128..e467128 100644 --- a/doc/src/snippets/sensors/plugin.cpp +++ b/src/sensors/doc/snippets/sensors/plugin.cpp diff --git a/doc/src/snippets/sensors/sensors.pro b/src/sensors/doc/snippets/sensors/sensors.pro index 20b5ae5..20b5ae5 100644 --- a/doc/src/snippets/sensors/sensors.pro +++ b/src/sensors/doc/snippets/sensors/sensors.pro diff --git a/doc/src/snippets/sensors/start.cpp b/src/sensors/doc/snippets/sensors/start.cpp index d8cbd99..d8cbd99 100644 --- a/doc/src/snippets/sensors/start.cpp +++ b/src/sensors/doc/snippets/sensors/start.cpp diff --git a/doc/src/snippets/snippets.pro b/src/sensors/doc/snippets/snippets.pro index f73d4a3..f73d4a3 100644 --- a/doc/src/snippets/snippets.pro +++ b/src/sensors/doc/snippets/snippets.pro diff --git a/doc/src/compatmap.qdoc b/src/sensors/doc/src/compatmap.qdoc index 0fd4951..0fd4951 100644 --- a/doc/src/compatmap.qdoc +++ b/src/sensors/doc/src/compatmap.qdoc diff --git a/doc/src/genericbackend.qdoc b/src/sensors/doc/src/genericbackend.qdoc index 689b412..689b412 100644 --- a/doc/src/genericbackend.qdoc +++ b/src/sensors/doc/src/genericbackend.qdoc diff --git a/doc/src/porting.qdoc b/src/sensors/doc/src/porting.qdoc index 24e0d7e..b52da35 100644 --- a/doc/src/porting.qdoc +++ b/src/sensors/doc/src/porting.qdoc @@ -39,12 +39,21 @@ \section1 QML - QtSensors ships with a QML import that is compatible with the QtMobility.sensors import. - The limitations of the QtMobility.sensors import have been fixed and some new properties - may exist so apps may need to be updated if they are using custom properties on their - sensor objects. - - See \l {Qt Sensors QML API} for more information. + Compatibility for QML applications is provided by shipping the legacy \c QtMobility.sensors + QML import. QML applications should not require any changes to continue operating. + + Applications using the legacy QML import may not be able to trivially port over + to the new QML import because the new QML import does not provide types for + every sensor like the legacy QML import does. + + \table + \row + \li \l {Qt Sensors QML Types}{QML API} + \li Information about the Qt Sensors QML API + \row + \li \l {QtMobility.sensors 1.x}{Legacy QML API} + \li Information about the legacy QtMobility.sensors QML API + \endtable \section1 C++ diff --git a/doc/src/imports/qtsensors5.qdoc b/src/sensors/doc/src/qtmobilitysensors1.qdoc index 02b5360..f9ba814 100644 --- a/doc/src/imports/qtsensors5.qdoc +++ b/src/sensors/doc/src/qtmobilitysensors1.qdoc @@ -26,20 +26,25 @@ ****************************************************************************/ /*! - \qmlmodule QtSensors 5.0 - \title Qt Sensors QML API - \brief QML import for QtSensors + \qmlmodule QtMobility.sensors 1.3 + \title QtMobility.sensors 1.x + \brief Legacy QML import for QtSensors \section1 Overview - This is the QtSensors QML import. + This is the legacy QML import. It exists for compatibility with the QtMobiltiy 1.2 release + and is not recommended for new applications. + + See \l{Qt Sensors} for more information about the Sensors API. \section1 QML Module API + See \l {Qt Sensors} for more information about the Sensors API. + If the module is imported into a namespace, some additional methods become available. \code - import QtSensors 5.0 as Sensors + import QtMobility.sensors 1.3 as Sensors ... Component.onCompleted: { var types = Sensors.sensorTypes(); @@ -53,7 +58,7 @@ These types represent specific types of sensors. - Note that most properties come from the abstract \l{QtSensors::Sensor}{Sensor} element. + Note that most properties come from the abstract \l{QtMobility.sensors1::Sensor}{Sensor} element. \annotatedlist qml-sensors_type diff --git a/doc/src/qtsensorgestures-cpp.qdoc b/src/sensors/doc/src/qtsensorgestures-cpp.qdoc index 179fc70..e78ce4d 100644 --- a/doc/src/qtsensorgestures-cpp.qdoc +++ b/src/sensors/doc/src/qtsensorgestures-cpp.qdoc @@ -27,17 +27,14 @@ /*! \page qtsensorgestures-cpp.html -\title QtSensorGestures C++ API +\title Sensor Gestures C++ Overview \brief Information about the QtSensorGestures C++ API \tableofcontents -\section1 - - \section1 Using QtSensorGestures -With QtSensorGestures, you are able to easily utilize device gesturing using +With the Sensor Gestures classes, you are able to easily utilize device gesturing using sensors such as the accelerometer and proximity. A list of currently supported sensor gestures and their descriptions can be found here: @@ -48,7 +45,7 @@ Using 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. -\snippet snippets/sensorgestures/creating.cpp Receiving sensor gesture signals +\snippet sensorgestures/creating.cpp Receiving sensor gesture signals More information about the sensor gesture recognizers can be found in \l{QtSensorGestures Plugins}. @@ -59,6 +56,5 @@ The primary classes that make up the QtSensorGestures API. \annotatedlist sensorgestures_main - */ diff --git a/doc/src/qtsensorgestures-emulator.qdoc b/src/sensors/doc/src/qtsensorgestures-emulator.qdoc index af061e2..af061e2 100644 --- a/doc/src/qtsensorgestures-emulator.qdoc +++ b/src/sensors/doc/src/qtsensorgestures-emulator.qdoc diff --git a/doc/src/qtsensorgestures-plugins.qdoc b/src/sensors/doc/src/qtsensorgestures-plugins.qdoc index a9996ca..67734aa 100644 --- a/doc/src/qtsensorgestures-plugins.qdoc +++ b/src/sensors/doc/src/qtsensorgestures-plugins.qdoc @@ -57,7 +57,7 @@ This is the class in which the gesture recognizer system should be implemented f \endlist -\snippet snippets/sensorgestures/plugin.cpp Plugin +\snippet sensorgestures/plugin.cpp Plugin \section2 Recognizer Classes diff --git a/doc/src/qtsensors-backend.qdoc b/src/sensors/doc/src/qtsensors-backend.qdoc index d3c6e75..e26c05a 100644 --- a/doc/src/qtsensors-backend.qdoc +++ b/src/sensors/doc/src/qtsensors-backend.qdoc @@ -76,7 +76,7 @@ that multiple sensor backends cannot be in a plugin. An example follows. -\snippet snippets/sensors/plugin.cpp Plugin +\snippet sensors/plugin.cpp Plugin */ diff --git a/doc/src/qtsensors-cpp.qdoc b/src/sensors/doc/src/qtsensors-cpp.qdoc index 49bb8a5..2f60592 100644 --- a/doc/src/qtsensors-cpp.qdoc +++ b/src/sensors/doc/src/qtsensors-cpp.qdoc @@ -27,7 +27,7 @@ /*! \page qtsensors-cpp.html -\title Qt Sensors C++ API +\title Qt Sensors C++ Overview \brief Information about the Qt Sensors C++ API \tableofcontents @@ -77,7 +77,7 @@ The life cycle of a QSensor is typically: Here is an example of creating a sensor on the heap and on the stack. -\snippet snippets/sensors/creating.cpp Creating a sensor +\snippet sensors/creating.cpp Creating a sensor \section1 Accessing sensor data in a generic fashion @@ -99,7 +99,7 @@ For example, here is an example of how you can access a property of the accelero This code does not require any compile-time links to \l QAccelerometer or \l QAccelerometerReading. -\snippet snippets/sensors/start.cpp Starting a sensor +\snippet sensors/start.cpp Starting a sensor You can discover all of this information at runtime too. The sensor_explorer example shows you information about available sensors. diff --git a/doc/src/qtsensors.qdoc b/src/sensors/doc/src/qtsensors.qdoc index b437da2..6128673 100644 --- a/doc/src/qtsensors.qdoc +++ b/src/sensors/doc/src/qtsensors.qdoc @@ -26,12 +26,13 @@ ****************************************************************************/ /*! - \page index-qtsensors.html + \page qtsensors-index.html \title Qt Sensors \brief The Qt Sensors API provides access to sensors via QML and C++ interfaces. \ingroup technology-apis 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. \section1 Information for Application Writers @@ -39,12 +40,18 @@ \table \row - \li \l {Qt Sensors QML API}{QML API} + \li \l {Qt Sensors QML Types}{QML Types} \li Information about the Qt Sensors QML API \row - \li \l {Qt Sensors C++ API}{C++ API} + \li \l {Qt Sensors C++ Classes}{C++ Classes} \li Information about the Qt Sensors C++ API \row + \li \l{Qt Sensors C++ Overview} + \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. + \row \li \l {Qt Sensors Examples}{Examples} \li Examples demonstrating use of the Qt Sensors APIs \endtable @@ -71,7 +78,7 @@ \li Information about the steps needed to port applications to the Qt Sensors API. \endtable - + \omit \section1 Information for Qt SensorGestures API Qt SensorGestures provides a motion gesture recognition API for devices. @@ -95,6 +102,7 @@ \li \l {QtSensorGestures Emulator}{Emulator} \li Information about Qt SensorGestures use in the Emulator. \endtable + \endomit \section1 Platform-specific Information \table diff --git a/src/sensors/doc/src/qtsensors5.qdoc b/src/sensors/doc/src/qtsensors5.qdoc new file mode 100644 index 0000000..71b62da --- /dev/null +++ b/src/sensors/doc/src/qtsensors5.qdoc @@ -0,0 +1,78 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: http://www.gnu.org/copyleft/fdl.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +/*! + \module QtSensors + \title Qt Sensors C++ Classes + \ingroup modules + + \brief The QtSensors module provides classes for reading sensor data. + + 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. +*/ + +/*! + \qmlmodule QtSensors 5 + \title Qt Sensors QML Types + \ingroup qmlmodules + + \brief The QtSensors QML module provides types for reading sensor data. + + \section1 QML Module API + + If the module is imported into a namespace, some additional methods become available. + + \code + import QtSensors 5.0 as Sensors + ... + Component.onCompleted: { + var types = Sensors.sensorTypes(); + console.log(types.join(", ")); + } + \endcode + + The documentation for the module API can be found in SensorGlobal. + + \section1 QML Sensor types + + These types represent specific types of sensors. + + Note that most properties come from the abstract \l{QtSensors::Sensor}{Sensor} element. + + \annotatedlist qml-sensors_type + + \section1 QML Reading types + + The data from a sensor comes through a reading class. + + \annotatedlist qml-sensors_reading +*/ + diff --git a/doc/src/examples/sensors.qdoc b/src/sensors/doc/src/sensor-examples.qdoc index d934c8a..d934c8a 100644 --- a/doc/src/examples/sensors.qdoc +++ b/src/sensors/doc/src/sensor-examples.qdoc diff --git a/src/sensors/gestures/qsensorgesturemanager.cpp b/src/sensors/gestures/qsensorgesturemanager.cpp index 897e72f..969347a 100644 --- a/src/sensors/gestures/qsensorgesturemanager.cpp +++ b/src/sensors/gestures/qsensorgesturemanager.cpp @@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE Sensor Gesture plugins register their recognizers using the registerSensorGestureRecognizer() function. - \snippet snippets/sensorgestures/creating.cpp Receiving sensor gesture signals + \snippet sensorgestures/creating.cpp Receiving sensor gesture signals */ diff --git a/src/sensors/qlightsensor.cpp b/src/sensors/qlightsensor.cpp index 30bd1de..b712bb6 100644 --- a/src/sensors/qlightsensor.cpp +++ b/src/sensors/qlightsensor.cpp @@ -49,7 +49,7 @@ IMPLEMENT_READING(QLightReading) /*! \class QLightReading \ingroup sensors_reading - + \inmodule QtSensors \brief The QLightReading class represents one reading from the light sensor. diff --git a/src/sensors/qsensor.cpp b/src/sensors/qsensor.cpp index 0e9fcea..81cb653 100644 --- a/src/sensors/qsensor.cpp +++ b/src/sensors/qsensor.cpp @@ -78,6 +78,7 @@ QT_BEGIN_NAMESPACE /*! \class qoutputrange \relates QSensor + \inmodule QtSensors \brief The qoutputrange class holds the specifics of an output range. The class is defined as a simple struct. @@ -507,7 +508,7 @@ void QSensor::setDataRate(int rate) Backends have to implement QSensorBackend::isFeatureSupported() to make this work. - \return whether or not the feature is supported if the backend is connected, or false if the backend is not connected. + Returns whether or not the feature is supported if the backend is connected, or false if the backend is not connected. \since 5.0 */ bool QSensor::isFeatureSupported(Feature feature) const diff --git a/src/sensors/qsensorbackend.cpp b/src/sensors/qsensorbackend.cpp index 4486554..304674e 100644 --- a/src/sensors/qsensorbackend.cpp +++ b/src/sensors/qsensorbackend.cpp @@ -77,7 +77,7 @@ QSensorBackend::~QSensorBackend() This is the backend side of QSensor::isFeatureSupported(). Reimplement this function if the backend supports one of the additional sensor features of QSensor::Feature. - \return whether the feature \a feature is supported by this backend. The default implementation returns false. + Returns whether the feature \a feature is supported by this backend. The default implementation returns false. \since 5.0 */ bool QSensorBackend::isFeatureSupported(QSensor::Feature feature) const diff --git a/src/sensors/sensors.pro b/src/sensors/sensors.pro index e0c6821..2cb3346 100644 --- a/src/sensors/sensors.pro +++ b/src/sensors/sensors.pro @@ -10,7 +10,7 @@ simulator { QT += simulator } -QMAKE_DOCS = $$PWD/../../doc/config/qtsensors.qdocconf +QMAKE_DOCS = $$PWD/doc/qtsensors.qdocconf load(qt_module) |