Qt Sensors QML Types
QML Module API
If the module is imported into a namespace, some additional methods become available.
import QtSensors 5.0 as Sensors ... Component.onCompleted: { var types = Sensors.sensorTypes(); console.log(types.join(", ")); }
The documentation for the module API can be found in SensorGlobal.
QML Sensor types
These types represent specific types of sensors.
Note that most properties come from the abstract Sensor element.
The Accelerometer element reports on linear acceleration along the X, Y and Z axes. | |
The Altimeter element reports on altitude. | |
The AmbientLightSensor element repors on ambient lighting conditions. | |
The AmbientTemperatureSensor element reports on the ambient temperature. | |
The Compass element reports on heading using magnetic north as a reference. | |
The Gyroscope element reports on rotational acceleration around the X, Y and Z axes. | |
The HolsterSensor element reports on whether a device is holstered. | |
The IRProximitySensor element reports on infra-red reflectance values. | |
The LightSensor element reports on light levels using LUX. | |
The Magnetometer element reports on magnetic field strength along the Z, Y and Z axes. | |
The OrientationSensor element reports device orientation. | |
The PressureSensor element reports on atmospheric pressure values. | |
The ProximitySensor element reports on object proximity. | |
The RotationSensor element reports on device rotation around the X, Y and Z axes. | |
The TapSensor element reports tap and double tap events along the X, Y and Z axes. | |
The TiltSensor element reports tilt events along the X and Y axes. |
QML Reading types
The data from a sensor comes via a reading class.
The AccelerometerReading element holds the most recent Accelerometer reading. | |
The AltimeterReading element holds the most recent Altimeter reading. | |
The AmbientLightReading element holds the most AmbientLightSensor reading. | |
The AmbientTemperatureReading element holds the most recent temperature reading. | |
The CompassReading element holds the most recent Compass reading. | |
The GyroscopeReading element holds the most recent Gyroscope reading. | |
The HolsterReading element holds the most recent HolsterSensor reading. | |
The IRProximityReading element holds the most recent IR proximity reading. | |
The LightReading element holds the most recent LightSensor reading. | |
The MagnetometerReading element holds the most recent Magnetometer reading. | |
The OrientationReading element holds the most recent OrientationSensor reading. | |
The PressureReading element holds the most recent PressureSensor reading. | |
The ProximityReading element holds the most recent ProximitySensor reading. | |
The RotationReading element holds the most recent RotationSensor reading. | |
The TapReading element holds the most recent TapSensor reading. | |
The TiltReading element holds the most recent TiltSensor reading. |
The Accelerometer element reports on linear acceleration along the X, Y and Z axes. | |
The AccelerometerReading element holds the most recent Accelerometer reading. | |
The Altimeter element reports on altitude. | |
The AltimeterReading element holds the most recent Altimeter reading. | |
The AmbientLightSensor element repors on ambient lighting conditions. | |
The AmbientLightReading element holds the most AmbientLightSensor reading. | |
The AmbientTemperatureSensor element reports on the ambient temperature. | |
The AmbientTemperatureReading element holds the most recent temperature reading. | |
The Compass element reports on heading using magnetic north as a reference. | |
The CompassReading element holds the most recent Compass reading. | |
The Gyroscope element reports on rotational acceleration around the X, Y and Z axes. | |
The GyroscopeReading element holds the most recent Gyroscope reading. | |
The HolsterSensor element reports on whether a device is holstered. | |
The HolsterReading element holds the most recent HolsterSensor reading. | |
The IRProximitySensor element reports on infra-red reflectance values. | |
The IRProximityReading element holds the most recent IR proximity reading. | |
The LightSensor element reports on light levels using LUX. | |
The LightReading element holds the most recent LightSensor reading. | |
The Magnetometer element reports on magnetic field strength along the Z, Y and Z axes. | |
The MagnetometerReading element holds the most recent Magnetometer reading. | |
The OrientationSensor element reports device orientation. | |
The OrientationReading element holds the most recent OrientationSensor reading. | |
The PressureSensor element reports on atmospheric pressure values. | |
The PressureReading element holds the most recent PressureSensor reading. | |
The ProximitySensor element reports on object proximity. | |
The ProximityReading element holds the most recent ProximitySensor reading. | |
The RotationSensor element reports on device rotation around the X, Y and Z axes. | |
The RotationReading element holds the most recent RotationSensor reading. | |
The Sensor element serves as a base type for sensors. | |
The SensorReading element serves as a base type for sensor readings. | |
Provides notifications when sensor-based gestures are detected. | |
The SensorGlobal element provides the module API. | |
The TapSensor element reports tap and double tap events along the X, Y and Z axes. | |
The TapReading element holds the most recent TapSensor reading. | |
The TiltSensor element reports tilt events along the X and Y axes. | |
The TiltReading element holds the most recent TiltSensor reading. |