QSensorGesture Class
The QSensorGesture class represents one or more sensor gesture recognizers. More...
Header: | #include <QSensorGesture> |
qmake: | QT += sensors |
Since: | Qt 5.1 |
Inherits: | QObject |
This class was introduced in Qt 5.1.
Public Functions
QSensorGesture(const QStringList &ids, QObject *parent = Q_NULLPTR) | |
virtual | ~QSensorGesture() |
QStringList | gestureSignals() const |
QStringList | invalidIds() const |
bool | isActive() |
void | startDetection() |
void | stopDetection() |
QStringList | validIds() const |
- 30 public functions inherited from QObject
Signals
void | detected(QString) |
- 2 signals inherited from QObject
Related Non-Members
typedef | QObjectList |
QList<T> | qFindChildren(const QObject *obj, const QRegExp ®Exp) |
T | qobject_cast(QObject *object) |
T | qobject_cast(const QObject *object) |
Macros
QT_NO_NARROWING_CONVERSIONS_IN_CONNECT | |
Q_CLASSINFO(Name, Value) | |
Q_DISABLE_COPY(Class) | |
Q_DISABLE_COPY_MOVE(Class) | |
Q_DISABLE_MOVE(Class) | |
Q_EMIT | |
Q_ENUM(...) | |
Q_ENUM_NS(...) | |
Q_FLAG(...) | |
Q_FLAG_NS(...) | |
Q_GADGET | |
Q_INTERFACES(...) | |
Q_INVOKABLE | |
Q_NAMESPACE | |
Q_OBJECT | |
Q_PROPERTY(...) | |
Q_REVISION | |
Q_SET_OBJECT_NAME(Object) | |
Q_SIGNAL | |
Q_SIGNALS | |
Q_SLOT | |
Q_SLOTS |
Additional Inherited Members
- 1 property inherited from QObject
- 1 public slot inherited from QObject
- 9 static public members inherited from QObject
- 9 protected functions inherited from QObject
Detailed Description
In addition to the QSensorGesture::detected() signal, Sensor Gesture Recognizers can have their own specific signals, and may be discovered through QSensorGesture::gestureSignals().
Note that QSensorGesture uses a custom meta-object in order to provide recognizer-specific signals. This means it is not possible to sub-class QSensorGesture and use Q_OBJECT. Also qobject_cast<QSensorGesture*>(ptr) will not work.
You may use QSensorGestureManager to obtain the systems known sensor gesture ids.
See also QSensorGestureRecognizer and QSensorGestureManager.
Member Function Documentation
QSensorGesture::QSensorGesture(const QStringList &ids, QObject *parent = Q_NULLPTR)
Constructs the sensor gesture, and initializes the ids list of recognizers, with parent parent
[signal]
void QSensorGesture::detected(QString)
Signals when the gestureId gesture has been recognized.
[virtual]
QSensorGesture::~QSensorGesture()
Destroy the QSensorGesture
QStringList QSensorGesture::gestureSignals() const
Returns all the possible gestures signals that may be emitted.
QStringList QSensorGesture::invalidIds() const
Returns the gesture recognizer ids that were not found.
bool QSensorGesture::isActive()
Returns whether this gesture is active or not.
void QSensorGesture::startDetection()
Starts the gesture detection routines in the recognizer.
void QSensorGesture::stopDetection()
Stops the gesture detection routines.
QStringList QSensorGesture::validIds() const
Returns the gesture recognizer ids that were found.