QDistanceReading 類

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

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

特性

公共函數

QDistanceReading (QObject * parent = DECLARE_READING(QDistanceReading))
virtual ~QDistanceReading ()
qreal distance () const
void setDistance (qreal distance )

重實現公共函數

virtual void copyValuesFrom (QSensorReading * other ) override

靜態公共成員

const QMetaObject staticMetaObject

額外繼承成員

詳細描述

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 單位 .

成員函數文檔編製

QDistanceReading:: QDistanceReading ( QObject * parent = DECLARE_READING(QDistanceReading))

Default constructs an instance of QDistanceReading.

[虛擬] QDistanceReading:: ~QDistanceReading ()

Destroys the instance of QDistanceReading. The destructor is virtual.

[override virtual] void QDistanceReading:: copyValuesFrom ( QSensorReading * other )

void QDistanceReading:: setDistance ( qreal distance )

將距離設為 distance .

另請參閱 distance ().