Sensor
The Sensor element serves as a base type for sensors. More...
Inherited by Accelerometer, AmbientLightSensor, Compass, Gyroscope, IRProximitySensor, LightSensor, Magnetometer, OrientationSensor, ProximitySensor, RotationSensor, TapSensor, and TiltSensor.
This type was introduced in QtSensors 5.0.
Properties
- active : bool
- alwaysOn : bool
- availableDataRates : list<Range>
- busy : bool
- connectedToBackend : bool
- dataRate : int
- description : string
- error : int
- identifier : string
- outputRange : int
- outputRanges : list<OutputRange>
- reading : SensorReading
- type : string
Methods
Detailed Description
The Sensor element serves as a base type for sensors.
This element wraps the QSensor class. Please see the documentation for QSensor for details.
This element cannot be directly created. Please use one of the sub-classes instead.
Property Documentation
This property holds a value to indicate if the sensor is active.
Please see QSensor::active for information about this property.
This property holds a value to indicate if the sensor should remain running when the screen is off.
Please see QSensor::alwaysOn for information about this property.
This property holds the data rates that the sensor supports.
Please see QSensor::availableDataRates for information about this property.
This property holds a value to indicate if the sensor is busy.
Please see QSensor::busy for information about this property.
This property holds a value indicating if the sensor has connected to a backend.
Please see QSensor::connectedToBackend for information about this property.
This property holds the data rate that the sensor should be run at.
Please see QSensor::dataRate for information about this property.
This property holds the backend identifier for the sensor.
Please see QSensor::identifier for information about this property.
This property holds the output range in use by the sensor.
Please see QSensor::outputRange for information about this property.
This property holds a list of output ranges the sensor supports.
Please see QSensor::outputRanges for information about this property.
reading : SensorReading |
This property holds the reading class.
Please see QSensor::reading for information about this property.
See also QML Reading types.
Method Documentation
Start retrieving values from the sensor. Returns true if the sensor was started, false otherwise.
Please see QSensor::start() for information.
Stop retrieving values from the sensor.
Please see QSensor::stop() for information.