QcompassReading 類錶示來自指南針的一讀取。 更多...
| 頭: | #include <QCompassReading> |
| qmake: | QT += sensors |
| Since: | Qt 5.1 |
| 繼承: | QSensorReading |
該類在 Qt 5.1 引入。
| qreal | azimuth () const |
| qreal | calibrationLevel () const |
| void | setAzimuth (qreal azimuth ) |
| void | setCalibrationLevel (qreal calibrationLevel ) |
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 QScreen::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.
此特性保持設備的方位角。
Measured in degrees from magnetic north in a clockwise direction based on the top of the device, as defined by QScreen::nativeOrientation .
訪問函數:
| qreal | azimuth () const |
另請參閱 QCompassReading 單位 .
此特性保持讀取的校準級彆。
度量值從 0 到 1,更高值更佳。
訪問函數:
| qreal | calibrationLevel () const |
另請參閱 QCompassReading 單位 .
設置 azimuth 為設備。
另請參閱 azimuth () 和 QCompassReading 單位 .
將讀取的校準級彆設為 calibrationLevel .
另請參閱 calibrationLevel ().