QSensorGestureRecognizer Class
The QSensorGestureRecognizer class is the base class for a sensor gesture recognizer. More...
Header: | #include <QSensorGestureRecognizer> |
qmake: | QT += sensors |
Since: | Qt 5.1 |
Inherits: | QObject |
Public Functions
QSensorGestureRecognizer(QObject *parent = Q_NULLPTR) | |
virtual | ~QSensorGestureRecognizer() |
void | createBackend() |
QStringList | gestureSignals() const |
virtual QString | id() const = 0 |
virtual bool | isActive() = 0 |
void | startBackend() |
void | stopBackend() |
- 31 public functions inherited from QObject
Signals
void | detected(const QString &) |
- 2 signals inherited from QObject
Static Public Members
const QMetaObject | staticMetaObject |
- 9 static public members inherited from QObject
Protected Functions
- 9 protected functions inherited from QObject
Additional Inherited Members
Detailed Description
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.
[virtual]
QSensorGestureRecognizer::~QSensorGestureRecognizer()
Destroy the QSensorGestureRecognizer
[pure virtual protected]
void QSensorGestureRecognizer::create()
void QSensorGestureRecognizer::createBackend()
Calls QSensorGestureRecognizer::create() if the recognizer is valid.
[signal]
void QSensorGestureRecognizer::detected(const QString &)
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
[pure virtual]
bool QSensorGestureRecognizer::isActive()
[pure virtual protected]
bool QSensorGestureRecognizer::start()
void QSensorGestureRecognizer::startBackend()
Calls QSensorGestureRecognizer::start() if the recognizer isn't already initialized. This is called by the QSensorGesture object, so please use that instead.
See also QSensorGesture::startDetection().
[pure virtual protected]
bool QSensorGestureRecognizer::stop()
void QSensorGestureRecognizer::stopBackend()
Calls QSensorGestureRecognizer::stop() if no other clients are using it. This is called by the QSensorGesture object, so please use that instead.
See also QSensorGesture::stopDetection().