The QTapSensor class is a convenience wrapper around QSensor . 更多...
| 頭: | #include <QTapSensor> |
| qmake: | QT += sensors |
| Since: | Qt 5.1 |
| 繼承: | QSensor |
該類在 Qt 5.1 引入。
| QTapSensor (QObject * parent = Q_NULLPTR) | |
| virtual | ~QTapSensor () |
| QTapReading * | reading () const |
| bool | returnDoubleTapEvents () const |
| void | setReturnDoubleTapEvents (bool returnDoubleTapEvents ) |
| void | returnDoubleTapEventsChanged (bool returnDoubleTapEvents ) |
唯一行為差異是此類正確設置類型。
此類還特徵 reading () 函數返迴 QTapReading 而不是 QSensorReading .
有關傳感器如何工作的細節,見 QTapReading .
另請參閱 QTapReading .
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 ) |
構造傳感器作為子級對於 parent .
[虛擬]
QTapSensor::
~QTapSensor
()
銷毀傳感器。停止傳感器若尚未停止。
返迴用於此傳感器的讀取類。
另請參閱 QSensor::reading ().