The QSensorFilter class provides an efficient callback facility for asynchronous notifications of sensor changes. More...
#include <QSensorFilter>
Inherited by: QAccelerometerFilter, QAmbientLightFilter, QCompassFilter, QGyroscopeFilter, QLightFilter, QMagnetometerFilter, QOrientationFilter, QProximityFilter, QRotationFilter, and QTapFilter.
This class was introduced in Qt Mobility 1.0.
virtual bool | filter ( QSensorReading * reading ) = 0 |
~QSensorFilter () |
The QSensorFilter class provides an efficient callback facility for asynchronous notifications of sensor changes.
Some sensors (eg. the accelerometer) are often accessed very frequently. This may be slowed down by the use of signals and slots. The QSensorFilter interface provides a more efficient way for the sensor to notify your class that the sensor has changed.
Additionally, multiple filters can be added to a sensor. They are called in order and each filter has the option to modify the values in the reading or to suppress the reading altogether.
Note that the values in the class returned by QSensor::reading() will not be updated until after the filters have been run.
See also filter().
Notifies the attached sensor (if any) that the filter is being destroyed.
This function was introduced in Qt Mobility 1.0.
This function is called when the sensor reading changes.
The filter can modify the reading.
Returns true to allow the next filter to receive the value. If this is the last filter, returning true causes the signal to be emitted and the value is stored in the sensor.
Returns false to drop the reading.
This function was introduced in Qt Mobility 1.0.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.