Go to the documentation of this file.00001
00031 #ifndef QMCOMPASS_H
00032 #define QMCOMPASS_H
00033 #include <QtCore/qobject.h>
00034 #include "qmsensor.h"
00035
00036 QT_BEGIN_HEADER
00037
00038 namespace MeeGo {
00045 class QmCompassReading : public QmSensorReading
00046 {
00047 public:
00048 int degrees;
00049 int level;
00050 };
00051
00071 class MEEGO_SYSTEM_EXPORT QmCompass : public QmSensor
00072 {
00073 Q_OBJECT;
00074 Q_PROPERTY(QmCompassReading value READ get);
00075 Q_PROPERTY(bool usedeclination READ useDeclination WRITE setUseDeclination);
00076 Q_PROPERTY(int declinationvalue READ declinationValue);
00077
00078 public:
00083 QmCompass(QObject *parent = 0);
00084
00088 ~QmCompass();
00089
00094 QmCompassReading get();
00095
00100 int declinationValue();
00101
00109 bool useDeclination();
00110
00116 void setUseDeclination(bool enable);
00117
00118 Q_SIGNALS:
00124 void dataAvailable(const MeeGo::QmCompassReading value);
00125
00126 };
00127
00128 }
00129
00130 QT_END_HEADER
00131
00132 #endif