summaryrefslogtreecommitdiffstats
path: root/src/sensors/qgyroscope.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/sensors/qgyroscope.h')
-rw-r--r--src/sensors/qgyroscope.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/sensors/qgyroscope.h b/src/sensors/qgyroscope.h
index 42318751f5..4b52f0a43a 100644
--- a/src/sensors/qgyroscope.h
+++ b/src/sensors/qgyroscope.h
@@ -43,6 +43,7 @@
#define QGYROSCOPE_H
#include "qsensor.h"
+#include "qorientablesensorbase.h"
QTM_BEGIN_NAMESPACE
@@ -75,13 +76,37 @@ private:
};
class Q_SENSORS_EXPORT QGyroscope : public QSensor
+#if defined(Q_OS_BLACKBERRY)
+, public QOrientableSensorBase
+#endif
{
Q_OBJECT
+#if !defined(Q_QDOC) && defined(Q_OS_BLACKBERRY)
+ Q_PROPERTY(AxesOrientationMode axesOrientationMode READ axesOrientationMode WRITE setAxesOrientationMode NOTIFY axesOrientationModeChanged)
+ Q_PROPERTY(int currentOrientation READ currentOrientation NOTIFY currentOrientationChanged)
+ Q_PROPERTY(int userOrientation READ userOrientation WRITE setUserOrientation NOTIFY userOrientationChanged)
+#endif
public:
+#if defined(Q_MOC_RUN) && defined(Q_OS_BLACKBERRY)
+ // Enums must be replicated in child classes to work in QML
+ enum AxesOrientationMode {
+ FixedOrientation,
+ AutomaticOrientation,
+ UserOrientation
+ };
+ Q_ENUMS(AxesOrientationMode)
+#endif
explicit QGyroscope(QObject *parent = 0) : QSensor(QGyroscope::type, parent) {}
virtual ~QGyroscope() {}
QGyroscopeReading *reading() const { return static_cast<QGyroscopeReading*>(QSensor::reading()); }
static char const * const type;
+
+#if !defined(Q_QDOC) && defined(Q_OS_BLACKBERRY)
+Q_SIGNALS:
+ void axesOrientationModeChanged(AxesOrientationMode axesOrientationMode);
+ void currentOrientationChanged(int currentOrientation);
+ void userOrientationChanged(int userOrientation);
+#endif
};
QTM_END_NAMESPACE