summaryrefslogtreecommitdiffstats
path: root/src/plugins/sensors/blackberry/bbproximitysensor.h
diff options
context:
space:
mode:
authorThomas McGuire <thomas.mcguire.qnx@kdab.com>2012-07-20 10:30:39 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-24 11:22:59 +0200
commit0de0ead684a322103ec9cff3dcf5153ef4c1545c (patch)
tree2e2b91a63cfdd2d079204eacd47eb02c5f9df3bd /src/plugins/sensors/blackberry/bbproximitysensor.h
parent48d6a32c0c4b81183dc9239194cefab218bd2363 (diff)
Blackberry: Remove custom BbProximityReading
BbProximityReading extended QProximityReading with a distance and a reflectance property. Reflectance is already available in the IR proximity sensor, while distance isn't supported on any device. Change-Id: I413d3e35b0ccae29592dc11c287c3af6d5133ecc Reviewed-by: Adam Parco <aparco@rim.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/plugins/sensors/blackberry/bbproximitysensor.h')
-rw-r--r--src/plugins/sensors/blackberry/bbproximitysensor.h30
1 files changed, 2 insertions, 28 deletions
diff --git a/src/plugins/sensors/blackberry/bbproximitysensor.h b/src/plugins/sensors/blackberry/bbproximitysensor.h
index e7851fe6..55a51a25 100644
--- a/src/plugins/sensors/blackberry/bbproximitysensor.h
+++ b/src/plugins/sensors/blackberry/bbproximitysensor.h
@@ -44,33 +44,7 @@
#include "bbsensorbackend.h"
#include <qproximitysensor.h>
-class BbProximityReadingPrivate;
-
-// We extend QProximityReading with two new properties
-class BbProximityReading : public QProximityReading
-{
- Q_OBJECT
-
- // Distance in cm
- Q_PROPERTY(qreal distance READ distance)
-
- // Same as in QIRProximityReading
- Q_PROPERTY(qreal reflectance READ reflectance)
-
-public:
- explicit BbProximityReading(QObject *parent = 0);
- ~BbProximityReading();
- void copyValuesFrom(QSensorReading *other);
- qreal distance() const;
- void setDistance(qreal distance);
- qreal reflectance() const;
- void setReflectance(qreal reflectance);
-
-private:
- QScopedPointer<BbProximityReadingPrivate> d;
-};
-
-class BbProximitySensor : public BbSensorBackend<BbProximityReading>
+class BbProximitySensor : public BbSensorBackend<QProximityReading>
{
Q_OBJECT
@@ -80,7 +54,7 @@ public:
static QString devicePath();
protected:
- bool updateReadingFromEvent(const sensor_event_t &event, BbProximityReading *reading) Q_DECL_OVERRIDE;
+ bool updateReadingFromEvent(const sensor_event_t &event, QProximityReading *reading) Q_DECL_OVERRIDE;
};
#endif