The QOrientableSensorBase class is the base class for all sensors that react to screen orientation changes.
All sensors based on this class support changing the reporting of the reading values based on the orientation of the screen. This is controlled by the axesOrientationMode property, which controls how the orientation affects the reading values.
In the default mode, QOrientableSensorBase::FixedOrientation, the reading values remain unaffected by the orientation. In the QOrientableSensorBase::AutomaticOrientation mode, the reading values are automatically rotated by taking the current screen orientation into account. And finally, in the QOrientableSensorBase::UserOrientation mode, the reading values are rotated according to a user-specified orientation.
The functionality of this is only available if it is supported by the backend, which can be checked by calling QSensor::isFeatureSupported() with the QSensor::AxesOrientation flag.
The orientation here is always the screen orientation, not the device orientation. The orientation values range from 0 to 270 degrees. The orientation is applied in clockwise direction. Note that when rotating a device by 90 degrees counter-clockwise, the screen orientation compensates for that by rotating 90 degrees to the right.
© 2013 Digia Plc and/or its subsidiaries. Documentation contributions included herein are the copyrights of their respective owners.
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Documentation sources may be obtained from www.qt-project.org.