summaryrefslogtreecommitdiffstats
path: root/src/plugins/sensors/blackberry/bbpressuresensor.h
diff options
context:
space:
mode:
authorThomas McGuire <thomas.mcguire.qnx@kdab.com>2013-01-08 16:55:38 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-01-23 18:32:35 +0100
commit02285d735e7d3bd8ddfb61b7ea5e16da4ad522d1 (patch)
tree6000899044feee17aae140df56eba1aa6126ffee /src/plugins/sensors/blackberry/bbpressuresensor.h
parentbbf9a9f61a18ccb478cbca414d85ed531f078966 (diff)
Add QPressureSensor
This adds a new QPressureSensor plus the assorted reading and filter classes, as well as a QML API. The Blackberry backend is ported to use the new reading class. Change-Id: Ifc86a2ae955a9337a67fd9a86ceabab908917cb3 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Diffstat (limited to 'src/plugins/sensors/blackberry/bbpressuresensor.h')
-rw-r--r--src/plugins/sensors/blackberry/bbpressuresensor.h19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/plugins/sensors/blackberry/bbpressuresensor.h b/src/plugins/sensors/blackberry/bbpressuresensor.h
index 833832c4..7531bd68 100644
--- a/src/plugins/sensors/blackberry/bbpressuresensor.h
+++ b/src/plugins/sensors/blackberry/bbpressuresensor.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Research In Motion
+** Copyright (C) 2013 Research In Motion
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtSensors module of the Qt Toolkit.
@@ -42,20 +42,9 @@
#define BBPRESSURESENSOR_H
#include "bbsensorbackend.h"
+#include <qpressuresensor.h>
-class BbPressureReadingPrivate;
-
-class BbPressureReading : public QSensorReading
-{
- Q_OBJECT
- Q_PROPERTY(qreal pressure READ pressure)
- DECLARE_READING(BbPressureReading)
-public:
- qreal pressure() const;
- void setPressure(qreal pressure);
-};
-
-class BbPressureSensor : public BbSensorBackend<BbPressureReading>
+class BbPressureSensor : public BbSensorBackend<QPressureReading>
{
Q_OBJECT
@@ -65,7 +54,7 @@ public:
static QString devicePath();
protected:
- bool updateReadingFromEvent(const sensor_event_t &event, BbPressureReading *reading) Q_DECL_OVERRIDE;
+ bool updateReadingFromEvent(const sensor_event_t &event, QPressureReading *reading) Q_DECL_OVERRIDE;
};
#endif