|qmake:||QT += sensors|
Additional Inherited Members
- 1 public slot inherited from QObject
- 2 signals inherited from QObject
- 11 static public members inherited from QObject
- 9 protected functions inherited from QObject
The QCompassReading class represents one reading from a compass.
The compass returns the azimuth of the device as degrees from magnetic north in a clockwise direction based on the top of the device, as defined by QPlatformScreen::nativeOrientation. There is also a value to indicate the calibration status of the device. If the device is not calibrated the azimuth may not be accurate.
Digital compasses are susceptible to magnetic interference and may need calibration after being placed near anything that emits a magnetic force. Accuracy of the compass can be affected by any ferrous materials that are nearby.
The calibration status of the device is measured as a number from 0 to 1. A value of 1 is the highest level that the device can support and 0 is the worst.
azimuth : const qreal
This property holds the azimuth of the device.
Measured in degrees from magnetic north in a clockwise direction based on the top of the device, as defined by QPlatformScreen::nativeOrientation.
See also QCompassReading Units.
calibrationLevel : const qreal
This property holds the calibration level of the reading.
Measured as a value from 0 to 1 with higher values being better.
Member Function Documentation
void QCompassReading::setAzimuth(qreal azimuth)
Sets the azimuth of the device.
void QCompassReading::setCalibrationLevel(qreal calibrationLevel)
Sets the calibration level of the reading to calibrationLevel.
See also calibrationLevel().
© 2016 The Qt Company Ltd. 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. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.