QSensorFilter Class
The QSensorFilter class provides an efficient callback facility for asynchronous notifications of sensor changes. More...
Header: | #include <QSensorFilter> |
qmake: | QT += sensors |
Inherited By: | QAccelerometerFilter, QAltimeterFilter, QAmbientLightFilter, QAmbientTemperatureFilter, QCompassFilter, QDistanceFilter, QGyroscopeFilter, QHolsterFilter, QHumidityFilter, QIRProximityFilter, QLidFilter, QLightFilter, QMagnetometerFilter, QOrientationFilter, QPressureFilter, QProximityFilter, QRotationFilter, QTapFilter, and QTiltFilter |
Protected Functions
virtual | ~QSensorFilter() |
Detailed Description
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().