summaryrefslogtreecommitdiffstats
path: root/src/sensors/qrotationsensor.h
diff options
context:
space:
mode:
authorThomas McGuire <thomas.mcguire.qnx@kdab.com>2013-02-01 09:44:00 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-08 11:17:45 +0100
commitae6d8a286b760198705e877a5ba4c1eecc7a5e8d (patch)
treeef93fec2264376743fe0fdf8bac1cac1dfe3d13d /src/sensors/qrotationsensor.h
parenta3f4766964022ff0dc7ea0832922c2a58ab47e82 (diff)
Convert QRotationSensor::hasZ to a proper property
Change-Id: I32edf761653fbe9d08710703b02fb1c0183aba3e Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
Diffstat (limited to 'src/sensors/qrotationsensor.h')
-rw-r--r--src/sensors/qrotationsensor.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/sensors/qrotationsensor.h b/src/sensors/qrotationsensor.h
index 77da31cd..68a0d1d3 100644
--- a/src/sensors/qrotationsensor.h
+++ b/src/sensors/qrotationsensor.h
@@ -71,19 +71,26 @@ private:
bool filter(QSensorReading *reading) { return filter(static_cast<QRotationReading*>(reading)); }
};
+class QRotationSensorPrivate;
+
class Q_SENSORS_EXPORT QRotationSensor : public QSensor
{
Q_OBJECT
-#ifdef Q_QDOC
- Q_PROPERTY(bool hasZ)
-#endif
+ Q_PROPERTY(bool hasZ READ hasZ NOTIFY hasZChanged)
public:
explicit QRotationSensor(QObject *parent = 0);
virtual ~QRotationSensor();
QRotationReading *reading() const { return static_cast<QRotationReading*>(QSensor::reading()); }
static char const * const type;
+ bool hasZ() const;
+ void setHasZ(bool hasZ);
+
+Q_SIGNALS:
+ void hasZChanged(bool hasZ);
+
private:
+ Q_DECLARE_PRIVATE(QRotationSensor)
Q_DISABLE_COPY(QRotationSensor)
};