QOrientableSensorBase
#include <QtSensors/QOrientableSensorBase>
More information will be added here shortly. For now, you'll find more extensive information about this class in the Qt reference for QOrientableSensorBase
QtSensors
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.
Overview
© 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.
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide. All other trademarks are property of their respective owners. Privacy Policy