QTapSensor Class

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

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

特性

公共函數

QTapSensor (QObject * parent = Q_NULLPTR)
virtual ~QTapSensor ()
QTapReading * reading () const
bool returnDoubleTapEvents () const
void setReturnDoubleTapEvents (bool returnDoubleTapEvents )

信號

void returnDoubleTapEventsChanged (bool returnDoubleTapEvents )

靜態公共成員

const QMetaObject staticMetaObject
const char *const type

額外繼承成員

詳細描述

The QTapSensor class is a convenience wrapper around QSensor .

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

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

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

另請參閱 QTapReading .

特性文檔編製

returnDoubleTapEvents : bool

This property holds a value indicating if double tap events should be reported.

Set to true (the default) to have the sensor report only on double tap events. Set to false to have the sensor report only on individual tap events.

It is not possible to have the sensor report both single and double tap events. If both are needed the app should create 2 sensor objects.

The property must be set before calling start ().

訪問函數:

bool returnDoubleTapEvents () const
void setReturnDoubleTapEvents (bool returnDoubleTapEvents )

通知程序信號:

void returnDoubleTapEventsChanged (bool returnDoubleTapEvents )

成員函數文檔編製

QTapSensor:: QTapSensor ( QObject * parent = Q_NULLPTR)

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

[虛擬] QTapSensor:: ~QTapSensor ()

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

QTapReading *QTapSensor:: reading () const

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

另請參閱 QSensor::reading ().