diff options
author | Kevin Ottens <kevin.ottens.qnx@kdab.com> | 2012-04-30 17:20:24 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-03 01:36:02 +0200 |
commit | bf3dde61cc7d611b1e5f2a18e533c535c4cd7ff8 (patch) | |
tree | ce3dd02d357b374c48c125f6f6c8ca05579f9c7e /src/plugins/sensors/blackberry/bbsensorbackend.h | |
parent | 78eb8007edde7f9403e148b8d4a3a65e57155427 (diff) |
Pause/resume sensor on application (de)activation
Each sensor now installs itself as an event filter of the application
object waiting to (de)activation events. When an ApplicationDeactivate
event arrives sensors are paused, they get resumed on
ApplicationActivate.
This behavior is inhibited by the alwaysOn property.
Change-Id: I559239f279d9412d8836efad08e6688019504b16
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Tennessee Carmel-Veilleux <tcarmelveilleux@rim.com>
Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
Diffstat (limited to 'src/plugins/sensors/blackberry/bbsensorbackend.h')
-rw-r--r-- | src/plugins/sensors/blackberry/bbsensorbackend.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/sensors/blackberry/bbsensorbackend.h b/src/plugins/sensors/blackberry/bbsensorbackend.h index a3afb372..4e4406a4 100644 --- a/src/plugins/sensors/blackberry/bbsensorbackend.h +++ b/src/plugins/sensors/blackberry/bbsensorbackend.h @@ -79,9 +79,12 @@ protected: virtual void processEvent(const sensor_event_t &sensorEvent) = 0; + virtual bool eventFilter(QObject *object, QEvent *event); + private slots: void dataAvailable(); void applyAlwaysOnProperty(); + void setPaused(bool paused); private: QFile m_deviceFile; |