QTapSensor Class

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 )

额外继承成员

详细描述

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 .

[virtual] QTapSensor:: ~QTapSensor ()

销毁传感器。停止传感器若尚未停止。

QTapReading *QTapSensor:: reading () const

返回用于此传感器的读取类。

另请参阅 QSensor::reading ().