diff options
author | Lincoln Ramsay <lincoln.ramsay@nokia.com> | 2012-06-19 11:45:09 +1000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-09-26 00:29:37 +0200 |
commit | f9d52ca1c093d8997d44cd8356b43b2665fdbf20 (patch) | |
tree | 45fd29bd91c67794bf3e1aefbf232bbd1d2f7b8f /doc/src | |
parent | 1d253860f9863fd015115d728c3f1bd04c5119c6 (diff) | |
download | qtsensors-f9d52ca1c093d8997d44cd8356b43b2665fdbf20.tar.gz |
QtMobility.sensors has a new implementation
This implementation fixes the limitations the original code had
and separates the QtSensors C++ API from the QML API so that
changes to one don't need to affect the other.
Change-Id: I519463f3c7cfbad3bce5c291ce166b8793d5ed4a
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/imports/qtmobilitysensors1.qdoc | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/doc/src/imports/qtmobilitysensors1.qdoc b/doc/src/imports/qtmobilitysensors1.qdoc index f0ac757..e040413 100644 --- a/doc/src/imports/qtmobilitysensors1.qdoc +++ b/doc/src/imports/qtmobilitysensors1.qdoc @@ -35,35 +35,32 @@ This is the legacy QML import. It exists for compatibility with the QtMobiltiy 1.2 release and is not recommended for new applications. - The QtMobility.sensors import has the Qt Sensors C++ classes directly exported into the QML environment. - This causes some limitations due to the use of types that do not work in the QML environment. - See \l{QtMobility.sensors QML Limitations}{below} for a list of the known limitations. + See \l{Qt Sensors} for more information about the Sensors API. - See \l Qt Sensors for more information about the Sensors API. + \section1 QML Module API - \section1 QtMobility.sensors QML Limitations + If the module is imported into a namespace, some additional methods become available. - The following limitations affect all versions of the QtMobility.sensors import. + \code + import QtMobility.sensors 1.3 as Sensors + ... + Component.onCompleted: { + var types = Sensors.sensorTypes(); + console.log(types.join(", ")); + } + \endcode - \list 1 - \li The QSensor::sensorid property cannot be set because QML does not support QByteArray. - This means that it is not possible to specify a particular sensor when two or more have - been registered with the same type. - \li The QSensor::availableDataRates property cannot be used because QML does not support \l qrangelist. - \li The QSensor::outputRanges property cannot be used because QML does not support \l qoutputrangelist. - \li The QLightSensor::fieldOfView property cannot be used because QML cannot access dynamic properties. - \li The QMagnetometer::returnGeoValues property cannot be used because QML cannot access dynamic properties. - \li The QRotationSensor::hasZ property cannot be used because QML cannot access dynamic properties. - \li The QTapSensor::returnDoubleTapEvents property cannot be used because QML cannot access dynamic properties. - \endlist + 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{QtMobility.sensors1::Sensor}{Sensor} element. + \annotatedlist qml-sensors_type - \section1 QML Reading Types + \section1 QML Reading types The data from a sensor comes through a reading class. |