diff options
author | Sergio Ahumada <sergio.ahumada@digia.com> | 2013-03-19 11:05:55 +0100 |
---|---|---|
committer | Sergio Ahumada <sergio.ahumada@digia.com> | 2013-03-19 11:06:33 +0100 |
commit | 50c16eab20a6d9884ab3149ef59137a10de63e6d (patch) | |
tree | 2684617d911514147283516ddd15803a4049da61 /src/plugins/sensors/blackberry/bbpressuresensor.cpp | |
parent | d2cafb8506b798bad7fa56f19557dd6e1cb25cd7 (diff) | |
parent | 879e5536b033302b2ad976750cd2351674e161d6 (diff) | |
download | qtsensors-50c16eab20a6d9884ab3149ef59137a10de63e6d.tar.gz |
Merge branch 'dev' into stable
This starts Qt 5.1 release cycle
Change-Id: Idce0f9b94f9e585abfb6903f554500a06f4f8aaa
Diffstat (limited to 'src/plugins/sensors/blackberry/bbpressuresensor.cpp')
-rw-r--r-- | src/plugins/sensors/blackberry/bbpressuresensor.cpp | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/src/plugins/sensors/blackberry/bbpressuresensor.cpp b/src/plugins/sensors/blackberry/bbpressuresensor.cpp index 01a2493..8cb9b1e 100644 --- a/src/plugins/sensors/blackberry/bbpressuresensor.cpp +++ b/src/plugins/sensors/blackberry/bbpressuresensor.cpp @@ -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. @@ -40,31 +40,8 @@ ****************************************************************************/ #include "bbpressuresensor.h" -class BbPressureReadingPrivate -{ -public: - BbPressureReadingPrivate() - : pressure(0) - { - } - - qreal pressure; -}; - -IMPLEMENT_READING(BbPressureReading) - -qreal BbPressureReading::pressure() const -{ - return d->pressure; -} - -void BbPressureReading::setPressure(qreal pressure) -{ - d->pressure = pressure; -} - BbPressureSensor::BbPressureSensor(QSensor *sensor) - : BbSensorBackend<BbPressureReading>(devicePath(), SENSOR_TYPE_PRESSURE, sensor) + : BbSensorBackend<QPressureReading>(devicePath(), SENSOR_TYPE_PRESSURE, sensor) { setDescription(QLatin1String("Pressure in Pascals")); } @@ -74,7 +51,7 @@ QString BbPressureSensor::devicePath() return QLatin1String("/dev/sensor/pressure"); } -bool BbPressureSensor::updateReadingFromEvent(const sensor_event_t &event, BbPressureReading *reading) +bool BbPressureSensor::updateReadingFromEvent(const sensor_event_t &event, QPressureReading *reading) { // TODO: I was unable to test this since the device I was testing this with did not have // a pressure sensor. Verify that this works and check that the units are correct. |