QDistanceReading 類

The QDistanceReading class holds distance reading in cm from the proximity sensor. 更多...

頭: #include <QDistanceReading>
qmake: QT += sensors
Since: Qt 5.4
繼承: QSensorReading

特性

公共函數

qreal distance () const
void setDistance (qreal distance )

額外繼承成員

詳細描述

The QDistanceReading class holds distance reading in cm from the proximity sensor.

The QDistanceReading class holds distance reading in cm from the proximity sensor. Note: Some proximity sensor only support two values for distance, a near and far value. In this case, the sensor should report its maximum range value to represent the far state, and a lesser value to represent the near state.

QDistanceReading 單位

距離以厘米為單位度量

The distance sensor is typically located in the front face of a device, and thus will measure the distance of an object from the device's front face.

特性文檔編製

distance : const qreal

對象與設備正麵的距離

訪問函數:

qreal distance () const

另請參閱 QDistanceReading 單位 .

成員函數文檔編製

void QDistanceReading:: setDistance ( qreal distance )

將距離設為 distance .

另請參閱 distance ().