QRotationSensor Class

The QRotationSensor class is a convenience wrapper around QSensor . 更多...

頭: #include <QRotationSensor>
qmake: QT += sensors
Since: Qt 5.1
繼承: QSensor

特性

公共函數

QRotationSensor (QObject * parent = Q_NULLPTR)
virtual ~QRotationSensor ()
bool hasZ () const
QRotationReading * reading () const
void setHasZ (bool hasZ )

信號

void hasZChanged (bool hasZ )

靜態公共成員

const QMetaObject staticMetaObject
const char *const type

額外繼承成員

詳細描述

The QRotationSensor class is a convenience wrapper around QSensor .

唯一行為差異是此類正確設置類型。

此類還特徵 reading () 函數返迴 QRotationReading 而不是 QSensorReading .

有關傳感器如何工作的細節,見 QRotationReading .

另請參閱 QRotationReading .

特性文檔編製

hasZ : const bool

This property holds a value indicating if the z angle is available.

Returns true if z is available. Returns false if z is not available.

訪問函數:

bool hasZ () const

通知程序信號:

void hasZChanged (bool hasZ )

成員函數文檔編製

QRotationSensor:: QRotationSensor ( QObject * parent = Q_NULLPTR)

構造傳感器作為子級對於 parent .

[虛擬] QRotationSensor:: ~QRotationSensor ()

銷毀傳感器。停止傳感器若尚未停止。

QRotationReading *QRotationSensor:: reading () const

返迴用於此傳感器的讀取類。

另請參閱 QSensor::reading ().

void QRotationSensor:: setHasZ ( bool hasZ )

Sets whether the z angle is available to hasZ . This is to be called from the backend. By default the hasZ property is true, so a backend only has to call this if its rotation sensor can not report z angles.

該函數在 Qt 5.1 引入。

另請參閱 hasZ ().