|qmake:||QT += sensors|
|QSensorGestureRecognizer(QObject *parent = Q_NULLPTR)|
|virtual QString||id() const = 0|
|virtual bool||isActive() = 0|
- 34 public functions inherited from QObject
|void||detected(const QString &)|
- 2 signals inherited from QObject
- 9 protected functions inherited from QObject
Additional Inherited Members
- 1 property inherited from QObject
- 1 public slot inherited from QObject
- 1 public variable inherited from QObject
- 10 static public members inherited from QObject
- 2 protected variables inherited from QObject
The QSensorGestureRecognizer class is the base class for a sensor gesture recognizer.
QSensorGesture recognizer developers should sub-class this to implement their own recognizer.
All sensor gesture recognizers have a detected(QString) signal. Implementors can use this and send recognizer specific gestures, such as detected("shake_left") or implement custom signals such as shakeLeft().
These custom signals will be available in the QSensorGesture object at runtime.
See also QSensorGestureRecognizer::gestureSignals().
Member Function Documentation
QSensorGestureRecognizer::QSensorGestureRecognizer(QObject *parent = Q_NULLPTR)
Constructs the QSensorGestureRecognizer with parent as parent.
Destroy the QSensorGestureRecognizer
Called by QSensorGesture object constructor to create the recognizers backend.
Implementors would use this to instantiate QSensors and connect signals.
Calls QSensorGestureRecognizer::create() if the recognizer is valid.
Signals when the gestureId gesture has been recognized.
QStringList QSensorGestureRecognizer::gestureSignals() const
Returns a list of signals that this recognizer supports.
Note that all signals declared will be exported to the QSensorGesture object. If you need to use signals that are not exported, you should use a private class to do so.
[pure virtual] QString QSensorGestureRecognizer::id() const
Returns the identifier for this recognizer.
Returns true if this recognizer is active, otherwise false.
Called by QSensorGesture::startDetection() to start this recognizer. Implementors should start the sensors. Returns true if the operation is successful.
See also QSensorGesture::startDetection().
Called by QSensorGesture::stopDetection() to stop this recognizer. Returns true if the call succeeds, otherwise false.
Implementors should stop the sensors.
See also QSensorGesture::stopDetection().
© 2018 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.