QmlSensors is a module API that provides information about currently available sensors types, identifiers, and the default sensors.
import QtSensors
// ...
Component.onCompleted: {
var types = QmlSensors.sensorTypes();
console.log(types.join(", "));
}
可以找到模塊 API 文檔編製在 QmlSensors .
這些類型錶示特定傳感器類型。
注意:大多數特性來自抽象 Sensor 元素。
| Element reports on linear acceleration along the X, Y and Z axes | |
| 元素報告環境照明條件 | |
| 元素報告環境溫度 | |
| Element reports on heading using magnetic north as a reference | |
| Element reports on rotational acceleration around the X, Y and Z axes | |
| Element reports on humidity | |
| Element reports on light levels using LUX | |
| Element reports on magnetic field strength along the Z, Y and Z axes | |
| Element reports device orientation | |
| Element reports on atmospheric pressure values | |
| Element reports on object proximity | |
| Element reports on device rotation around the X, Y and Z axes | |
| Element reports tilt events along the X and Y axes |
數據來自傳感器憑藉讀取類。
| Element holds the most recent Accelerometer reading | |
| Element holds the most AmbientLightSensor reading | |
| Element holds the most recent temperature reading | |
| Element holds the most recent Compass reading | |
| Element holds the most recent Gyroscope reading | |
| Element holds the most recent HumiditySensor reading | |
| Element holds the most recent LightSensor reading | |
| Element holds the most recent Magnetometer reading | |
| Element holds the most recent OrientationSensor reading | |
| Element holds the most recent PressureSensor reading | |
| Element holds the most recent ProximitySensor reading | |
| Element holds the most recent RotationSensor reading | |
| Element holds the most recent TiltSensor reading |
| Element reports on linear acceleration along the X, Y and Z axes | |
| Element holds the most recent Accelerometer reading | |
| Element holds the most AmbientLightSensor reading | |
| 元素報告環境照明條件 | |
| Element holds the most recent temperature reading | |
| 元素報告環境溫度 | |
| Element reports on heading using magnetic north as a reference | |
| Element holds the most recent Compass reading | |
| Element reports on rotational acceleration around the X, Y and Z axes | |
| Element holds the most recent Gyroscope reading | |
| Element holds the most recent HumiditySensor reading | |
| Element reports on humidity | |
| Element holds the most recent LightSensor reading | |
| Element reports on light levels using LUX | |
| Element reports on magnetic field strength along the Z, Y and Z axes | |
| Element holds the most recent Magnetometer reading | |
| Element holds the most recent OrientationSensor reading | |
| Element reports device orientation | |
| Element holds the most recent PressureSensor reading | |
| Element reports on atmospheric pressure values | |
| Element holds the most recent ProximitySensor reading | |
| Element reports on object proximity | |
| Singleton provides the module API | |
| Element holds the most recent RotationSensor reading | |
| Element reports on device rotation around the X, Y and Z axes | |
| Element serves as a base type for sensors | |
| Element serves as a base type for sensor readings | |
| Element holds the most recent TiltSensor reading | |
| Element reports tilt events along the X and Y axes |