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 ().