diff options
Diffstat (limited to 'src/sensors/doc/src')
-rw-r--r-- | src/sensors/doc/src/compatmap.qdoc | 158 | ||||
-rw-r--r-- | src/sensors/doc/src/genericbackend.qdoc | 28 | ||||
-rw-r--r-- | src/sensors/doc/src/qt6-changes.qdoc | 28 | ||||
-rw-r--r-- | src/sensors/doc/src/qtsensorgestures-cpp.qdoc | 70 | ||||
-rw-r--r-- | src/sensors/doc/src/qtsensorgestures-plugins.qdoc | 167 | ||||
-rw-r--r-- | src/sensors/doc/src/qtsensors-backend.qdoc | 28 | ||||
-rw-r--r-- | src/sensors/doc/src/qtsensors-cpp.qdoc | 43 | ||||
-rw-r--r-- | src/sensors/doc/src/qtsensors-modules.qdoc | 28 | ||||
-rw-r--r-- | src/sensors/doc/src/qtsensors-tutorial.qdoc | 36 | ||||
-rw-r--r-- | src/sensors/doc/src/qtsensors.qdoc | 120 | ||||
-rw-r--r-- | src/sensors/doc/src/sensor-examples.qdoc | 29 | ||||
-rw-r--r-- | src/sensors/doc/src/sensorfwbackend.qdoc | 28 |
12 files changed, 236 insertions, 527 deletions
diff --git a/src/sensors/doc/src/compatmap.qdoc b/src/sensors/doc/src/compatmap.qdoc index 025af476..41f91a73 100644 --- a/src/sensors/doc/src/compatmap.qdoc +++ b/src/sensors/doc/src/compatmap.qdoc @@ -1,29 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2017 Research In Motion -** Contact: https://www.qt.io/licensing/ -** -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/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: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 Research In Motion +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only /*! \page compatmap.html @@ -155,10 +131,140 @@ <td bgcolor="gray"></td> <td bgcolor="green"></td> </tr> + </tbody> </table> \endraw + \raw DocBook +<db:informaltable cellpadding="2" cellspacing="1" border="1" width="90%"> + <db:tbody> + <db:tr> + <db:td>Color</db:td> + <db:td>Explanation</db:td> + </db:tr> + <db:tr> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td>The sensor is supported.</db:td> + </db:tr> + <db:tr> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td>The sensor is not supported.</db:td> + </db:tr> + </db:tbody> + </db:informaltable> + + + <db:informaltable cellpadding="2" cellspacing="1" border="1" rules="all" width="90%"> + <db:tbody> + <db:tr> + <db:td><db:emphasis role="bold">Feature</db:emphasis></db:td> + <db:td><db:emphasis role="bold">Android</db:emphasis></db:td> + <db:td><db:emphasis role="bold">Linux</db:emphasis></db:td> + <db:td><db:emphasis role="bold">iOS</db:emphasis></db:td> + <db:td><db:emphasis role="bold">Windows</db:emphasis></db:td> + <db:td><db:emphasis role="bold">Generic</db:emphasis></db:td> + </db:tr> + <db:tr> + <db:td>Accelerometer</db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + </db:tr> + <db:tr> + <db:td>Ambient Light Sensor</db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + </db:tr> + <db:tr> + <db:td>Ambient Temperature Sensor</db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + </db:tr> + <db:tr> + <db:td>Compass</db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + </db:tr> + <db:tr> + <db:td>Gyroscope</db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + </db:tr> + <db:tr> + <db:td>Light Sensor</db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + </db:tr> + <db:tr> + <db:td>Magnetometer</db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + </db:tr> + <db:tr> + <db:td>Orientation Sensor</db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + </db:tr> + <db:tr> + <db:td>Pressure Sensor</db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + </db:tr> + <db:tr> + <db:td>Proximity Sensor</db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + </db:tr> + <db:tr> + <db:td>Rotation Sensor</db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + </db:tr> + <db:tr> + <db:td>Tilt Sensor</db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + </db:tr> + </db:tbody> + </db:informaltable> + \endraw + 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. diff --git a/src/sensors/doc/src/genericbackend.qdoc b/src/sensors/doc/src/genericbackend.qdoc index 001fce77..2c314e6d 100644 --- a/src/sensors/doc/src/genericbackend.qdoc +++ b/src/sensors/doc/src/genericbackend.qdoc @@ -1,29 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2017 Research In Motion -** Contact: https://www.qt.io/licensing/ -** -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/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: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 Research In Motion +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only /*! \page genericbackend.html diff --git a/src/sensors/doc/src/qt6-changes.qdoc b/src/sensors/doc/src/qt6-changes.qdoc index 6f3c3598..de4f682b 100644 --- a/src/sensors/doc/src/qt6-changes.qdoc +++ b/src/sensors/doc/src/qt6-changes.qdoc @@ -1,29 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/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: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only /*! \page qtsensors-changes-qt6.html diff --git a/src/sensors/doc/src/qtsensorgestures-cpp.qdoc b/src/sensors/doc/src/qtsensorgestures-cpp.qdoc deleted file mode 100644 index 164ffafb..00000000 --- a/src/sensors/doc/src/qtsensorgestures-cpp.qdoc +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/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: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/*! -\page qtsensorgestures-cpp.html -\title Sensor Gestures C++ Overview -\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. - -A list of currently supported sensor gestures and their descriptions can be found here: -\l {Qt Sensor Gestures} - -Using \c QtSensorGestures is easy. There are two main classes you will need to use: - -\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 - -More information about the sensor gesture recognizers can be found in -\l{QtSensorGestures Plugins}. - -\section1 Main Classes - -The primary classes that make up the QtSensorGestures API: - -\annotatedlist sensorgestures_main - -The primary classes that make up the \c QtSensorGesturesRecognizers API: - -\annotatedlist sensorgestures_recognizer - -Details of the \c QSensorGesturePlugins available - -\annotatedlist sensorgesture_plugins_topics - -*/ - diff --git a/src/sensors/doc/src/qtsensorgestures-plugins.qdoc b/src/sensors/doc/src/qtsensorgestures-plugins.qdoc deleted file mode 100644 index b181c16b..00000000 --- a/src/sensors/doc/src/qtsensorgestures-plugins.qdoc +++ /dev/null @@ -1,167 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/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: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/*! -\group sensorgesture_plugins_topics -\title QtSensorGestures Plugins -\brief Explains how to develop recognizer plugins with QtSensorGestures - -The QtSensorGestures recognizer plugins are the way to create your own -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 -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. - -\tableofcontents - -\section1 Overview - - 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. -\li Create an instance of that recognizer in the derived QSensorGesturePluginInterface class, and call - QSensorGestureManager::registerSensorGestureRecognizer(sRec); in your registerRecognizers() -function. QSensorGestureManager will retain ownership of the recognizer object. - -This is the class in which the gesture recognizer system should be implemented from. - -\endlist - -\snippet sensorgestures/plugin.cpp Plugin - - -\section2 Recognizer Classes - -If you are making sensorgestures available through the QtSensorGestures API, these are the -classes to subclass. - -\annotatedlist sensorgestures_recognizer - -\target Qt Sensor Gestures -\section3 Recognizer Plugins - -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 accommodate 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 is it possible for the user to define his own sensor-based motion gestures. - -A procedure for writing ad-hoc recognizers might include: -\list - \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. - \endlist - \li Test procedure to make sure it is easy to perform, and will not - produce too many false positive recognitions, or collisions if used with other gestures. Meaning -that gestures performed get recognized as another gesture instead. - -\endlist - -Below you will find a list of included plugins and their signals. - -For the ShakeGestures plugin: - \table - \row - \li Recognizer Id - \li Signals - \row - \li QtSensors.shake - \li shake -\endtable - -For the QtSensorGestures plugin: - \table - \row - \li Recognizer Id - \li Signals - \li Description - \li Images - \row - \li QtSensors.cover - \li cover - \li Hand covers up phone display for one second, when it's face up, using the Proximity and Orientation sensors. - \li \image sensorgesture-cover.png - \row - \li QtSensors.doubletap - \li doubletap - \li Double tap of finger on phone, using the DoubleTap sensor. - \li \image sensorgesture-doubletap.png - \row - \li QtSensors.hover - \li hover - \li Hand hovers about 4 cm above the phone for more than 1 second, then is removed when face up, - using the IR Proximity sensor. - \li \image sensorgesture-hover.png - \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. Uses the Accelerometer sensor. - \li \image sensorgesture-faceup.png - \row - \li QtSensors.shake2 - \li shakeLeft, shakeRight, shakeUp, shakeDown - \li Shake phone in a certain direction, using the Accelerometer sensor. - \li \image sensorgesture-shake.png - \row - \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. Uses the Accelerometer and Orientation sensors. - \li \image sensorgesture-slam_1.png - \image sensorgesture-slam_2.png - \row - \li QtSensors.turnover - \li turnover - \li Phone is turned face down and placed on a surface, using Proximity and Orientation sensors. - \li \image sensorgesture-facedown.png - \row - \li QtSensors.twist - \li twistLeft, twistRight - \li Phone is held face up and then twisted left or right (left side up or right side up) and back, using the Accelerometer and Orientation sensors. - \li \image sensorgesture-twist.png - \row - \li QtSensors.whip - \li whip - \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 752e8f92..35945f61 100644 --- a/src/sensors/doc/src/qtsensors-backend.qdoc +++ b/src/sensors/doc/src/qtsensors-backend.qdoc @@ -1,29 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/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: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only /*! \page sensors-backend-topics.html diff --git a/src/sensors/doc/src/qtsensors-cpp.qdoc b/src/sensors/doc/src/qtsensors-cpp.qdoc index d732a0dd..b70f8276 100644 --- a/src/sensors/doc/src/qtsensors-cpp.qdoc +++ b/src/sensors/doc/src/qtsensors-cpp.qdoc @@ -1,34 +1,11 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/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: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only /*! \page qtsensors-cpp.html \title Qt Sensors C++ Overview \brief Explains how to use the Qt Sensors C++ API. +\ingroup explanation \tableofcontents @@ -103,8 +80,18 @@ This code does not require any compile-time links to \l QAccelerometer or \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. +You can discover all of this information at runtime too. + +\section1 Discovering Sensors And Reading Properties At Runtime + +Sometimes it may be that the available sensors are not known at development time. +It is possible to find out which sensors are available as illustrated below: + +\snippet sensors/start.cpp Find sensors + +Furthermore it is possible to discover the reading details for these sensors, as illustrated below: + +\snippet sensors/start.cpp Print reading properties \section1 Front End, Back End diff --git a/src/sensors/doc/src/qtsensors-modules.qdoc b/src/sensors/doc/src/qtsensors-modules.qdoc index 6b4c9713..7a4d29ba 100644 --- a/src/sensors/doc/src/qtsensors-modules.qdoc +++ b/src/sensors/doc/src/qtsensors-modules.qdoc @@ -1,29 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/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: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only /*! diff --git a/src/sensors/doc/src/qtsensors-tutorial.qdoc b/src/sensors/doc/src/qtsensors-tutorial.qdoc new file mode 100644 index 00000000..147b8504 --- /dev/null +++ b/src/sensors/doc/src/qtsensors-tutorial.qdoc @@ -0,0 +1,36 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only + +/*! + \page qtsensors-tutorial.html + \title How to create your own Sensor + \brief Steps for creating your own sensors + + The Qt Sensors module provides access to sensor hardware via QML and C++ + interfaces. + + The API is supported on \l{Qt for Android}{Android}, \l{Qt for iOS}{iOS}, and + \l {Qt for Windows}{Windows (MSVC)}. + + \section1 Creating your own sensor using C++ API + + Using a Qt module's C++ API requires linking against the module library, either + directly or through other dependencies. + \section2 Creating a sensor + + To create your own sensor you can use the following steps: + + \list + \li Create your own MySensor and MySensorReading classes + \snippet sensors/tutorial.cpp MySensor + \li Create a MySensorBackend by inheriting from QSensorBackend + \li Create MySensorBackendFactory factory class for instantiating that + backend by inheriting a class QSensorBackendFactory + \li Register the backend factory by calling + QSensorManager::registerBackend ("MySensorType", "MySensorId", &myfactory) + \li Instantiate the new MySensor and start using it + \endlist + + As an another option the sensors are put into a \l {Creating a sensor plugin} + that you can use on demand. +*/ diff --git a/src/sensors/doc/src/qtsensors.qdoc b/src/sensors/doc/src/qtsensors.qdoc index fb805d83..c25349fd 100644 --- a/src/sensors/doc/src/qtsensors.qdoc +++ b/src/sensors/doc/src/qtsensors.qdoc @@ -1,29 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2019 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/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: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only /*! \page qtsensors-index.html @@ -31,81 +7,67 @@ \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 module provides access to sensor hardware via QML and C++ + interfaces. - Currently the API is supported on \l{Qt for Android}{Android}, + Currently, the API is supported on \l{Qt for Android}{Android}, \l{Qt for iOS}{iOS}, and \l {Qt for Windows}{Windows (MSVC)}. - \section1 Information for Application Writers + \section1 Using the Module - Applications can access Qt Sensors using QML or C++. + \section2 QML API - To include the definitions of the module's classes, use the following directive: + \include {module-use.qdocinc} {using the qml api} {QtSensors} - \code - #include <QtSensors> - \endcode + \section2 C++ API - To import the QML types into your application, use the following import statement - in your .qml file: + \include {module-use.qdocinc} {using the c++ api} - \qml - import QtSensors - \endqml + \section3 Building with CMake - To link against the module: + \include {module-use.qdocinc} {building with cmake} {Sensors} - Using cmake: - \include qtsensors-module-use.qdocinc cmakebuild + \section3 Building with qmake - Using qmake: - \include qtsensors-module-use.qdocinc qmakebuild + \include {module-use.qdocinc} {building_with_qmake} {sensors} - Further references: + \section1 Articles and Guides - \table - \row - \li \l {Qt Sensors QML Types}{QML Types} - \li Information about the Qt Sensors QML API - \row - \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 {Qt Sensors Examples}{Examples} - \li Examples demonstrating the use of the Qt Sensors APIs - \endtable + \list + \li \l {Qt Sensors C++ Overview} + \li \l {Generic Backend} {Generic Backend} + \li \l {Qt Sensors Backend} + \li \l {Compatibility Map} {Compatibility Map} + \li \l {How to create your own Sensor} + \endlist - \section1 Information for Backend Implementors + \section1 Examples - \table - \row - \li \l {Qt Sensors Backend}{Backend} - \li Information about the Qt Sensors back end - \row - \li \l {Qt Sensors - Grue Sensor Example} - \li The Qt Sensors - Grue Sensor Example demonstrates creation of a sensor backend - \endtable + \list + \li \l {Qt Sensors Examples} {Examples} + \endlist + + \section1 API Reference + + \list + \li \l {Qt Sensors QML Types} {QML Types} + \li \l {Qt Sensors C++ Classes} {C++ Classes} + \endlist \section1 Module Evolution \l{Changes to Qt Sensors} lists important changes in the module API - and functionality that were done for the Qt 6 series of Qt. - - \section1 Platform-specific Information - \table - \row - \li \l {Compatibility Map}{Compatibility Map} - \li Compatibility map of all supported platforms. - \row - \li \l {Generic Backend}{Generic Backend} - \li Information about the generic sensor backend. - \endtable + and functionality that were made for the Qt 6 series of Qt. + + \section1 Licenses and Attributions The Qt Sensors module is available under commercial licenses from \l{The Qt Company}. In addition, it is available under free software licenses: The \l{GNU Lesser General Public License, version 3}, or the \l{GNU General Public License, version 2}. See \l{Qt Licensing} for further details. + + Furthermore, Qt Sensors in Qt \QtVersion may contain third-party + modules under following permissive licenses: + + \generatelist{groupsbymodule attributions-qtsensors} */ diff --git a/src/sensors/doc/src/sensor-examples.qdoc b/src/sensors/doc/src/sensor-examples.qdoc index 769d8f69..8e8d8d75 100644 --- a/src/sensors/doc/src/sensor-examples.qdoc +++ b/src/sensors/doc/src/sensor-examples.qdoc @@ -1,35 +1,10 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/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: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only /*! \group qtsensors-examples \title Qt Sensors Examples \brief Examples for the Qt Sensors module - \ingroup all-examples These are the Qt Sensors examples. diff --git a/src/sensors/doc/src/sensorfwbackend.qdoc b/src/sensors/doc/src/sensorfwbackend.qdoc index 21539bdb..4e3a980d 100644 --- a/src/sensors/doc/src/sensorfwbackend.qdoc +++ b/src/sensors/doc/src/sensorfwbackend.qdoc @@ -1,29 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2017 Jolla Mobile -** Contact: https://www.qt.io/licensing/ -** -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/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: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 Jolla Mobile +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only /*! \page senorfwbackend.html |