summaryrefslogtreecommitdiffstats
path: root/src/sensors/qsensor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sensors/qsensor.cpp')
-rw-r--r--src/sensors/qsensor.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/sensors/qsensor.cpp b/src/sensors/qsensor.cpp
index 39820797..9dc11d19 100644
--- a/src/sensors/qsensor.cpp
+++ b/src/sensors/qsensor.cpp
@@ -341,6 +341,23 @@ bool QSensor::isActive() const
}
/*!
+ \property QSensor::alwaysOn
+ \brief a value to indicate if the sensor should remain running when the screen is off.
+
+ Some platforms have a policy of suspending sensors when the screen turns off.
+ Setting this property to true will ensure the sensor continues to run.
+*/
+void QSensor::setAlwaysOn(bool alwaysOn)
+{
+ d->alwaysOn = alwaysOn;
+}
+
+bool QSensor::isAlwaysOn() const
+{
+ return d->alwaysOn;
+}
+
+/*!
\property QSensor::availableDataRates
\brief the data rates that the sensor supports.