TiltSensorProvides access to the current X and Y axis rotation angles of the device. More... Inherits Sensor This type was introduced in QtSensors 5.0. Properties
Signals
Methods
Detailed DescriptionThis element provides tilt data from the rotation around the x and y axis of the device using the accelerometer sensor. Like for a marble and maze game, where the marble is rolled around the screen according to the user tilting the device. This element is part of the QtSensors 5 module. The Qt Sensors - Simple QML Example is an example how to use this QML element. Property DocumentationThis property contains the accuracy (in degrees) in which the rotation should be measured. This can be used to minimize signal emiting and therefore saving of performance. Default value is 1 degree. The accuracy value is unsigned and works clockwise and counterclockwise in X and Y axis rotation directions. Accuracy range can be 0 to 90 degrees. For example: Accuracy 5.5 will notify the client application about an rotation change only if the rotation angle over the X and / or Y axis was changed by 5.5 or more degrees clockwise or anti-clockwise.
This property contains the setting of the current state. It can be used for saving and reloading previously saved calibrations. Holds the speed that the sensor should be run at. Default is Slow.
Returns the unit of the rotation which can be one of:
Holds the rotation arround the x axis. Holds the rotation arround the y axis. Signal DocumentationThis signal is emitted whenever the change from at leat one of the rotation values was higher than the accuracy. The angle value is based on the specified unit (Degree or Radian). See also QtSensors5::TiltSensor::unit and TiltSensor.unit. Method DocumentationThe call of this function calibrates the tilt from x and y to the current position. |