Merge branch 'qml' of https://vcs.maemo.org/git/situare into qml
[situare] / src / qmlui / rotation.h
1 #ifndef ROTATION_H
2 #define ROTATION_H
3
4 #include <QObject>
5
6 namespace QtMobility {
7 class QOrientationSensor;
8 }
9 using QtMobility::QOrientationSensor;
10
11 class Rotation : public QObject
12 {
13     Q_OBJECT
14
15     Q_PROPERTY(QString orientation READ orientation NOTIFY orientationChanged)
16
17 public:
18     explicit Rotation(QObject *parent = 0);
19
20     const QString& orientation() const;
21
22 signals:
23     void orientationChanged();
24
25 public slots:
26     void onReadingChanged();
27     void startReading();
28
29 private:
30     QOrientationSensor *m_sensor;
31     QString m_orientation;
32 };
33
34 #endif // ROTATION_H