From 5effd1712aa6f1ae2359762cdadeb70198121f77 Mon Sep 17 00:00:00 2001 From: Wolfgang Beck Date: Fri, 25 May 2012 12:31:38 +1000 Subject: Update Examples using the same name conventions e.g. Folder of example should start with QtSensorrs_ Example documentation title should start with QtSensors - images folder renamed to content Change-Id: I341fb8510ba3ad64068d786559e8d28af5d135c3 Reviewed-by: Lincoln Ramsay --- doc/src/cubehouse.qdoc | 60 ------------------------------ doc/src/examples/accelbubble.qdoc | 12 +++--- doc/src/examples/cubehouse.qdoc | 60 ++++++++++++++++++++++++++++++ doc/src/examples/grue.qdoc | 32 ++++++++-------- doc/src/examples/qmlsensorgtestures.qdoc | 63 ++++++++++++++++++++++++++++++++ doc/src/examples/sensorgestures.qdoc | 8 ++-- doc/src/qmlsensorgtestures.qdoc | 63 -------------------------------- doc/src/qtsensors.qdoc | 4 +- 8 files changed, 151 insertions(+), 151 deletions(-) delete mode 100644 doc/src/cubehouse.qdoc create mode 100644 doc/src/examples/cubehouse.qdoc create mode 100644 doc/src/examples/qmlsensorgtestures.qdoc delete mode 100644 doc/src/qmlsensorgtestures.qdoc (limited to 'doc/src') diff --git a/doc/src/cubehouse.qdoc b/doc/src/cubehouse.qdoc deleted file mode 100644 index 42bdd3d0..00000000 --- a/doc/src/cubehouse.qdoc +++ /dev/null @@ -1,60 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** GNU Free Documentation License -** 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. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms -** and conditions contained in a signed written agreement between you -** and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/*! - \example QtSensors/cubehouse - \title 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. - \image cubehouse.png - -\section1 Overview - To write a QML application that will use the QML Accelerometer element from the QtMobility.sensors import you need to to the following steps: - - Import the QtMobility.sensors declarative plugin: - -\snippet ../examples/QtSensors/cubehouse/Cubehouse.qml 0 - - Add the Accelerometer QML elements into your qml file. - -\snippet ../examples/QtSensors/cubehouse/Cubehouse.qml 1 - - In additional two properties are added to save the calculated pitch and roll values: - -\snippet ../examples/QtSensors/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 element: - -\snippet ../examples/QtSensors/cubehouse/Cubehouse.qml 3 - - By using a timer the view can be rotated using the pitch and roll properties from the Accelerometer element: - -\snippet ../examples/QtSensors/cubehouse/Cubehouse.qml 4 - -*/ - diff --git a/doc/src/examples/accelbubble.qdoc b/doc/src/examples/accelbubble.qdoc index 962bce67..71885331 100644 --- a/doc/src/examples/accelbubble.qdoc +++ b/doc/src/examples/accelbubble.qdoc @@ -26,8 +26,8 @@ ****************************************************************************/ /*! - \example QtSensors/accelbubble - \title Accel Bubble + \example QtSensors/QtSensors_accelbubble + \title Qt Sensors - Accel Bubble \brief The AccelBubble example demonstrates the Legacy Accelerometer QML element. \ingroup qtsensors-examples @@ -36,19 +36,19 @@ Import the Legacy Sensors Declarative module. -\snippet ../examples/QtSensors/accelbubble/main.qml 0 +\snippet ../examples/QtSensors/QtSensors_accelbubble/QtSensors_accelbubble.qml 0 Add an Accelerometer QML element. -\snippet ../examples/QtSensors/accelbubble/main.qml 1 +\snippet ../examples/QtSensors/QtSensors_accelbubble/QtSensors_accelbubble.qml 1 The accelerometer might run too fast for what we need, so add a timer to read the accelerometer's readings. -\snippet ../examples/QtSensors/accelbubble/main.qml 2 +\snippet ../examples/QtSensors/QtSensors_accelbubble/QtSensors_accelbubble.qml 2 Use the 'active' property to start the sensor -\snippet ../examples/QtSensors/accelbubble/main.qml 3 +\snippet ../examples/QtSensors/QtSensors_accelbubble/QtSensors_accelbubble.qml 3 */ diff --git a/doc/src/examples/cubehouse.qdoc b/doc/src/examples/cubehouse.qdoc new file mode 100644 index 00000000..278dd865 --- /dev/null +++ b/doc/src/examples/cubehouse.qdoc @@ -0,0 +1,60 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** GNU Free Documentation License +** 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. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms +** and conditions contained in a signed written agreement between you +** and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example QtSensors/QtSensors_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. + \image cubehouse.png + +\section1 Overview + To write a QML application that will use the QML Accelerometer element from the QtMobility.sensors import you need to to the following steps: + + Import the QtMobility.sensors declarative plugin: + +\snippet ../examples/QtSensors/QtSensors_cubehouse/QtSensors_cubehouse.qml 0 + + Add the Accelerometer QML elements into your qml file. + +\snippet ../examples/QtSensors/QtSensors_cubehouse/QtSensors_cubehouse.qml 1 + + In additional two properties are added to save the calculated pitch and roll values: + +\snippet ../examples/QtSensors/QtSensors_cubehouse/QtSensors_cubehouse.qml 2 + + Reading out the Accelerometer data can be done by implementing the 'onReadingChanged' slot and + accessing the 'reading' property from the Accelerometer element: + +\snippet ../examples/QtSensors/QtSensors_cubehouse/QtSensors_cubehouse.qml 3 + + By using a timer the view can be rotated using the pitch and roll properties from the Accelerometer element: + +\snippet ../examples/QtSensors/QtSensors_cubehouse/QtSensors_cubehouse.qml 4 + +*/ + diff --git a/doc/src/examples/grue.qdoc b/doc/src/examples/grue.qdoc index a64528aa..73a67fc1 100644 --- a/doc/src/examples/grue.qdoc +++ b/doc/src/examples/grue.qdoc @@ -27,11 +27,11 @@ /*! \page gruesensorexample.html - \title Grue Sensor Example - \brief The Grue sensor example demonstrates all the steps from creating a new sensor to using it. + \title Qt Sensors - Grue Sensor Example + \brief The Qt Sensors - Grue sensor example demonstrates all the steps from creating a new sensor to using it. \ingroup qtsensors-examples - The Grue sensor example demonstrates all the steps from creating a new sensor to using it. + The Qt Sensors - Grue sensor example demonstrates all the steps from creating a new sensor to using it. The sensor definition is placed in a library where client apps can access it. The actual implementation lives in a plugin. @@ -57,7 +57,7 @@ */ /*! - \example QtSensors/grue/lib + \example QtSensors/QtSensors_grue/lib \title Grue Sensor Definition \brief The Grue sensor is defined in a library so that applications can use it. @@ -74,11 +74,11 @@ src/sensors. As such, it contains some generated code that defines the convenience classes GrueFilter and GrueSensor. - \sa {Grue Sensor Example} + \sa {Qt Sensors - Grue Sensor Example} */ /*! - \example QtSensors/grue/plugin + \example QtSensors/QtSensors_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/QtSensors/grue/plugin/gruesensorimpl.cpp start + \snippet ../examples/QtSensors/QtSensors_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/QtSensors/grue/plugin/gruesensorimpl.cpp setReading + \snippet ../examples/QtSensors/QtSensors_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. @@ -119,11 +119,11 @@ The Grue sensor backend is delivered as a plugin. The plugin has a factory object that registers the types available and does the actual instantiation of the backend. - \sa {Grue Sensor Example} + \sa {Qt Sensors - Grue Sensor Example} */ /*! - \example QtSensors/grue/console_app + \example QtSensors/QtSensors_grue/console_app \title Grue Sensor Console Application \brief The Grue sensor console application demonstrates use of the Grue sensor. @@ -131,21 +131,21 @@ access feature of Qt Sensors to avoid a link-time dependency on the Grue Sensor library. - \sa {Grue Sensor Example} + \sa {Qt Sensors - Grue Sensor Example} */ /*! - \example QtSensors/grue/import + \example QtSensors/QtSensors_grue/import \title Grue Sensor QML Import \brief The Grue sensor QML import exports the GrueSensor class as a QML element. This example creates the \e {Grue 1.0} import. - \sa {Grue Sensor Example} + \sa {Qt Sensors - Grue Sensor Example} */ /*! - \example QtSensors/grue/qml_app + \example QtSensors/QtSensors_grue \title Grue Sensor QML Application \brief The Grue sensor QML application demonstrates use of the GrueSensor QML element. @@ -154,9 +154,9 @@ this example or it will not be able to find its dependencies. \code - qmlscene main.qml + qmlscene QtSensors_grue.qml \endcode - \sa {Grue Sensor Example} + \sa {Qt Sensors - Grue Sensor Example} */ diff --git a/doc/src/examples/qmlsensorgtestures.qdoc b/doc/src/examples/qmlsensorgtestures.qdoc new file mode 100644 index 00000000..1da467a8 --- /dev/null +++ b/doc/src/examples/qmlsensorgtestures.qdoc @@ -0,0 +1,63 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** GNU Free Documentation License +** 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. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms +** and conditions contained in a signed written agreement between you +** and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example QtSensors/QtSensors_qmlsensorgestures + \title Qt Sensors - SensorGesture QML Element example + \ingroup qtsensors-examples + + \brief This example demonstrates use of the SensorGesture QML element. + +\section1 Overview + To write a QML application that will use the gesture plugin you need to to the following steps: + + Import the QtSensors 5.x declarative plugin: + +\snippet ../examples/QtSensors/QtSensors_qmlsensorgestures/GestureView.qml 0 + + Add the SensorGesture QML element into your qml file. + +\snippet ../examples/QtSensors/QtSensors_qmlsensorgestures/GestureView.qml 1 + + Each SensorGesture QML element contains a property called gestures. + + In this example an alias 'gestureid' for this property is used. + +\snippet ../examples/QtSensors/QtSensors_qmlsensorgestures/GestureView.qml 2 + + By using this alias property you define which gestures should be used: + +\snippet ../examples/QtSensors/QtSensors_qmlsensorgestures/QtSensors_qmlsensorgestures.qml 3 + + A list of all available gestures can be created by calling the 'availableGestures' property: + +\snippet ../examples/QtSensors/QtSensors_qmlsensorgestures/GestureList.qml 4 + +\sa {Qt Sensors - ShakeIt QML Example} +\sa {Qt Sensor Gestures} +*/ + diff --git a/doc/src/examples/sensorgestures.qdoc b/doc/src/examples/sensorgestures.qdoc index 6da13c85..4940dfb5 100644 --- a/doc/src/examples/sensorgestures.qdoc +++ b/doc/src/examples/sensorgestures.qdoc @@ -27,7 +27,7 @@ /*! \page sensorgestureexample.html - \title C++ Sensor Gestures Example + \title Qt Sensors - C++ Sensor Gestures Example \ingroup qtsensors-examples \brief The sensor gesture example demonstrates the steps for creating a C++ application that uses sensor gestures and the included shake sensor. @@ -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/QtSensors/sensorgestures/mainwindow.cpp 0 + \snippet ../examples/QtSensors/QtSensors_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/QtSensors/sensorgestures/mainwindow.cpp 1 + \snippet ../examples/QtSensors/QtSensors_sensorgestures/mainwindow.cpp 1 and later stop the detection process. - \snippet ../examples/QtSensors/sensorgestures/mainwindow.cpp 2 + \snippet ../examples/QtSensors/QtSensors_sensorgestures/mainwindow.cpp 2 The QSensorGesture object will contain all the signals of the valid requested recognizers found on the system. diff --git a/doc/src/qmlsensorgtestures.qdoc b/doc/src/qmlsensorgtestures.qdoc deleted file mode 100644 index a384d266..00000000 --- a/doc/src/qmlsensorgtestures.qdoc +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** GNU Free Documentation License -** 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. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms -** and conditions contained in a signed written agreement between you -** and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/*! - \example QtSensors/qmlsensorgestures/qml_app - \title SensorGesture QML Element example - \ingroup qtsensors-examples - - \brief This example demonstrates use of the SensorGesture QML element. - -\section1 Overview - To write a QML application that will use the gesture plugin you need to to the following steps: - - Import the QtSensors 5.x declarative plugin: - -\snippet ../examples/QtSensors/qmlsensorgestures/qml_app/GestureView.qml 0 - - Add the SensorGesture QML element into your qml file. - -\snippet ../examples/QtSensors/qmlsensorgestures/qml_app/GestureView.qml 1 - - Each SensorGesture QML element contains a property called gestures. - - In this example an alias 'gestureid' for this property is used. - -\snippet ../examples/QtSensors/qmlsensorgestures/qml_app/GestureView.qml 2 - - By using this alias property you define which gestures should be used: - -\snippet ../examples/QtSensors/qmlsensorgestures/qml_app/Gesture.qml 3 - - A list of all available gestures can be created by calling the 'availableGestures' property: - -\snippet ../examples/QtSensors/qmlsensorgestures/qml_app/GestureList.qml 4 - -\sa {Qt Sensors - ShakeIt QML Example} -\sa {Qt Sensor Gestures} -*/ - diff --git a/doc/src/qtsensors.qdoc b/doc/src/qtsensors.qdoc index 925bc5af..cc10651c 100644 --- a/doc/src/qtsensors.qdoc +++ b/doc/src/qtsensors.qdoc @@ -56,8 +56,8 @@ \li \l {Qt Sensors Backend}{Backend} \li Information about the Qt Sensors back end \row - \li \l {Grue Sensor Example} - \li The Grue Sensor Example demonstrates creation of a sensor backend + \li \l {Qt Sensors - Grue Sensor Example} + \li The Qt Sensors - Grue Sensor Example demonstrates creation of a sensor backend \endtable \section1 Compatibility with QtMobility Sensors API -- cgit v1.2.3