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 AmbientLightSensor element repors on ambient lighting conditions. | |
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 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 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 through a reading class.
The AccelerometerReading element holds the most recent Accelerometer reading. | |
The AmbientLightReading element holds the most AmbientLightSensor reading. | |
The CompassReading element holds the most recent Compass reading. | |
The GyroscopeReading element holds the most recent Gyroscope 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 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 AmbientLightReading element holds the most AmbientLightSensor reading. | |
The AmbientLightSensor element repors on ambient lighting conditions. | |
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 IRProximityReading element holds the most recent IR proximity reading. | |
The IRProximitySensor element reports on infra-red reflectance values. | |
The LightReading element holds the most recent LightSensor reading. | |
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 MagnetometerReading element holds the most recent Magnetometer reading. | |
The OrientationReading element holds the most recent OrientationSensor reading. | |
The OrientationSensor element reports device orientation. | |
The ProximityReading element holds the most recent ProximitySensor reading. | |
The ProximitySensor element reports on object proximity. | |
The RotationReading element holds the most recent RotationSensor reading. | |
The RotationSensor element reports on device rotation around the X, Y and Z axes. | |
The Sensor element serves as a base type for sensors. | |
Provides notifications when sensor-based gestures are detected. | |
The SensorGlobal element provides the module API. | |
The SensorReading element serves as a base type for sensor readings. | |
The TapReading element holds the most recent TapSensor reading. | |
The TapSensor element reports tap and double tap events along the X, Y and Z axes. | |
The TiltReading element holds the most recent TiltSensor reading. | |
The TiltSensor element reports tilt events along the X and Y axes. |