summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorThomas McGuire <thomas.mcguire.qnx@kdab.com>2012-06-29 13:18:47 +0200
committerLorn Potter <lorn.potter@gmail.com>2012-11-28 18:29:54 +0100
commitb64e52acb421dceae303124f63059c658090bd5d (patch)
tree078f30d387f1e44ee5e2ceb3d73db71bd8d554c4 /plugins
parent56bf25db496cbf2bb8fec3114cc24007688cc3c7 (diff)
Add QPressureSensor and QHolsterSensor
Change-Id: I650e31887d8e8651058e6d30417e8c64a4ed8645 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/declarative/sensors/sensors.cpp101
1 files changed, 100 insertions, 1 deletions
diff --git a/plugins/declarative/sensors/sensors.cpp b/plugins/declarative/sensors/sensors.cpp
index 0a0180d925..500e680eeb 100644
--- a/plugins/declarative/sensors/sensors.cpp
+++ b/plugins/declarative/sensors/sensors.cpp
@@ -55,6 +55,9 @@
#include <qgyroscope.h>
#include "qmlsensorgesture.h"
+#include <qpressuresensor.h>
+#include <qholstersensor.h>
+
QT_BEGIN_NAMESPACE
QTM_USE_NAMESPACE
@@ -143,7 +146,10 @@ public:
qmlRegisterUncreatableType<QGyroscopeReading >(package, major, minor, "GyroscopeReading", QLatin1String("Cannot create GyroscopeReading"));
qmlRegisterType <QmlSensorGesture >(package, major, minor, "SensorGesture");
-
+ qmlRegisterType <QHolsterSensor >(package, major, minor, "HolsterSensor");
+ qmlRegisterUncreatableType<QHolsterReading >(package, major, minor, "HolsterReading", QLatin1String("Cannot create HolsterReading"));
+ qmlRegisterType <QPressureSensor >(package, major, minor, "PressureSensor");
+ qmlRegisterUncreatableType<QPressureReading >(package, major, minor, "PressureReading", QLatin1String("Cannot create PressureReading"));
}
};
@@ -869,3 +875,96 @@ Q_EXPORT_PLUGIN2(qsensorsdeclarativemodule, QT_PREPEND_NAMESPACE(QSensorsDeclara
\qmlproperty qreal IRProximityReading::reflectance
Please see QIRProximityReading::reflectance for information about this property.
*/
+
+/*!
+ \qmlclass PressureSensor QPressureSensor
+ \ingroup qml-sensors_type
+ \since Mobility 1.3
+ \inherits Sensor
+ \brief The PressureSensor type reports on atmospheric pressure values.
+
+ This type wraps the QPressureSensor class. Please see the documentation of
+ QPressureSensor for details.
+
+ \sa {QML Limitations}
+*/
+
+/*!
+ \qmlproperty PressureReading PressureSensor::reading
+ Holds the most recent pressure reading.
+ Please see QSensor::reading for information about this property.
+*/
+
+/*!
+ \qmlsignal PressureSensor::onReadingChanged()
+ Called when the reading object changes.
+ Please see QSensor::readingChanged() for information about this signal.
+*/
+
+/*!
+ \qmlclass PressureReading QPressureReading
+ \ingroup qml-sensors_reading
+ \since Mobility 1.3
+ \inherits SensorReading
+ \brief The PressureReading type holds the most recent pressure reading.
+
+ The PressureReading type holds the most recent pressure reading.
+
+ This type wraps the QPressureReading class. Please see the documentation of
+ QPressureReading for details.
+
+ This type cannot be directly created.
+*/
+
+/*!
+ \qmlproperty qreal PressureReading::pressure
+ Please see QPressureReading::pressure for information about this property.
+*/
+
+/*!
+ \qmlclass HolsterSensor QHolsterSensor
+ \ingroup qml-sensors_type
+ \since Mobility 1.3
+ \inherits Sensor
+ \brief The HolsterSensor type detects if a device is holstered or not.
+
+ The HolsterSensor type detects if a device is holstered or not.
+
+ This type wraps the QHolsterSensor class.
+
+ \sa {QML Limitations}
+ \sa QHolsterSensor
+*/
+
+/*!
+ \qmlproperty HolsterReading HolsterSensor::reading
+ Holds the most recent holster reading.
+ \sa QSensor::reading
+*/
+
+/*!
+ \qmlsignal HolsterSensor::onReadingChanged()
+ Called when the reading object changes.
+ \sa QSensor::readingChanged()
+*/
+
+/*!
+ \qmlclass HolsterReading QHolsterReading
+ \ingroup qml-sensors_reading
+ \since Mobility 1.3
+ \inherits SensorReading
+ \brief The HolsterReading type holds the most recent HolsterSensor reading.
+
+ The HolsterReading type holds the most recent HolsterSensor reading.
+
+ This type wraps the QHolsterReading class.
+
+ This type cannot be directly created.
+
+ \sa QHolsterReading
+*/
+
+/*!
+ \qmlproperty bool HolsterReading::holstered
+ \sa QHolsterReading::holstered
+*/