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

This class was introduced in Qt 5.1.

Public Functions

QSensorGestureRecognizer(QObject *parent = Q_NULLPTR)
virtual ~QSensorGestureRecognizer()
void createBackend()
QStringList gestureSignals() const
void startBackend()
void stopBackend()
  • 16 public functions inherited from QObject
typedef QObjectList

Macros

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public slot inherited from QObject
  • 1 signal inherited from QObject
  • 5 static public members inherited from QObject
  • 8 protected functions inherited from QObject

Detailed Description

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

void QSensorGestureRecognizer::createBackend()

Calls QSensorGestureRecognizer::create() if the recognizer is valid.

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.

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

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