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 |