diff options
author | Kevin Ottens <kevin.ottens.qnx@kdab.com> | 2012-05-03 10:54:41 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-04 14:15:08 +0200 |
commit | 0cadbe2057f47e6bb4c72441b8f62ef574125e6b (patch) | |
tree | 8a2ec59c35323f9034cf0d53898beae68c829dff /src/plugins/sensors/blackberry/main.cpp | |
parent | bf3dde61cc7d611b1e5f2a18e533c535c4cd7ff8 (diff) |
Add support for the IR proximity sensor
Change-Id: I04e1c1eb7702626f4ce5e19b301f8774e604b930
Reviewed-by: Tennessee Carmel-Veilleux <tcarmelveilleux@rim.com>
Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
Diffstat (limited to 'src/plugins/sensors/blackberry/main.cpp')
-rw-r--r-- | src/plugins/sensors/blackberry/main.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/sensors/blackberry/main.cpp b/src/plugins/sensors/blackberry/main.cpp index abe5972c..61ec0cd4 100644 --- a/src/plugins/sensors/blackberry/main.cpp +++ b/src/plugins/sensors/blackberry/main.cpp @@ -41,6 +41,7 @@ #include "bbaccelerometer.h" #include "bbaltimeter.h" #include "bbgyroscope.h" +#include "bbirproximitysensor.h" #include "bblightsensor.h" #include "bbmagnetometer.h" #include "bborientationsensor.h" @@ -54,6 +55,7 @@ static const char *bbAccelerometerId = "bbAccelerometer"; static const char *bbAltitmeterId = "bbAltimeter"; static const char *bbGyroscopeId = "bbGyroscope"; +static const char *bbIRProximitySensorId = "bbIRProximitySensor"; static const char *bbLightSensorId = "bbLightSensor"; static const char *bbMagnetometerId = "bbMagnetometer"; static const char *bbOrientationSensorId = "bbOrientationSensor"; @@ -76,6 +78,8 @@ public: QSensorManager::registerBackend("BbAltimeter", bbAltitmeterId, this); if (sensorSupported(BbGyroscope::devicePath())) QSensorManager::registerBackend("QGyroscope", bbGyroscopeId, this); + if (sensorSupported(BbIRProximitySensor::devicePath())) + QSensorManager::registerBackend("QIRProximitySensor", bbIRProximitySensorId, this); if (sensorSupported(BbLightSensor::devicePath())) QSensorManager::registerBackend("QLightSensor", bbLightSensorId, this); if (sensorSupported(BbMagnetometer::devicePath())) @@ -99,6 +103,8 @@ public: backend = new BbAltimeter(sensor); if (sensor->identifier() == bbGyroscopeId) backend = new BbGyroscope(sensor); + if (sensor->identifier() == bbIRProximitySensorId) + backend = new BbIRProximitySensor(sensor); if (sensor->identifier() == bbLightSensorId) backend = new BbLightSensor(sensor); if (sensor->identifier() == bbMagnetometerId) |