#include <mw/sensorgesture/xqsensorgesturemanager.h>
Link against: sensorgesturemanager.lib
class XQSensorGestureManager : public QObject, public QObject |
Public Properties | |
---|---|
QStringList | gestureTypes |
Public Member Functions | |
---|---|
XQSensorGestureManager(QObject *) | |
Q_INVOKABLE QStringList | gestureTypes() |
Q_INVOKABLE bool | isGestureTypeAvailable(const QString &) |
Q_INVOKABLE bool | isStarted(const QString &) |
Q_INVOKABLE bool | start(const QString &) |
Q_INVOKABLE void | stop(const QString &) |
Q_INVOKABLE void | stopAll() |
Public Signals | |
---|---|
void | gestureTypesChanged() |
void | recognized(const QString &, const QDeclarativePropertyMap &) |
Inherited Attributes | |
---|---|
QObject::objectName | |
QObject::staticQtMetaObject |
Inherited Functions | |
---|---|
QObject::QObject(QObjectPrivate &,QObject *) | |
QObject::blockSignals(bool) | |
QObject::childEvent(QChildEvent *) | |
QObject::children()const | |
QObject::connect(const QObject *,const QMetaMethod &,const QObject *,const QMetaMethod &,Qt::ConnectionType) | |
QObject::connect(const QObject *,const char *,const QObject *,const char *,Qt::ConnectionType) | |
QObject::connect(const QObject *,const char *,const char *,Qt::ConnectionType)const | |
QObject::connectNotify(const char *) | |
QObject::customEvent(QEvent *) | |
QObject::deleteLater | |
QObject::destroyed | |
QObject::disconnect(const QObject *,const QMetaMethod &,const QObject *,const QMetaMethod &) | |
QObject::disconnect(const QObject *,const char *) | |
QObject::disconnect(const QObject *,const char *,const QObject *,const char *) | |
QObject::disconnect(const char *,const QObject *,const char *) | |
QObject::disconnectNotify(const char *) | |
QObject::dumpObjectInfo() | |
QObject::dumpObjectTree() | |
QObject::dynamicPropertyNames()const | |
QObject::event(QEvent *) | |
QObject::eventFilter(QObject *,QEvent *) | |
QObject::findChild(const QString &)const | |
QObject::findChildren(const QRegExp &)const | |
QObject::findChildren(const QString &)const | |
QObject::inherits(const char *)const | |
QObject::installEventFilter(QObject *) | |
QObject::isWidgetType()const | |
QObject::killTimer(int) | |
QObject::moveToThread(QThread *) | |
QObject::objectName()const | |
QObject::parent()const | |
QObject::property(const char *)const | |
QObject::receivers(const char *)const | |
QObject::registerUserData() | |
QObject::removeEventFilter(QObject *) | |
QObject::sender()const | |
QObject::senderSignalIndex()const | |
QObject::setObjectName(const QString &) | |
QObject::setParent(QObject *) | |
QObject::setProperty(const char *,const QVariant &) | |
QObject::setUserData(uint,QObjectUserData *) | |
QObject::signalsBlocked()const | |
QObject::startTimer(int) | |
QObject::thread()const | |
QObject::timerEvent(QTimerEvent *) | |
QObject::userData(uint)const | |
QObject::~QObject() |
The XQSensorGestureManager class allows applications to respond to different sensor gestures.
QStringList | gestureTypes |
Returns the complete list of avaliable gesture recognizers that are supported.
QStringList availableGestures = sensorGestureManager->gestureTypes();
XQSensorGestureManager | ( | QObject * | parent = 0 | ) | [explicit] |
Constructors a XQSensorGestureManager object.
XQSensorGestureManager* sensorGestureManager = new XQSensorGestureManager();
Parameters | |
---|---|
parent | the object to be set as parent. |
Q_INVOKABLE QStringList | gestureTypes | ( | ) | const |
void | gestureTypesChanged | ( | ) | [signal] |
This signal is emitted when new recognizers have been installed or when existing recognizers have been uninstalled.
Q_INVOKABLE bool | isGestureTypeAvailable | ( | const QString & | gestureType | ) | const |
Determines if a specific sensor gesture can be recognized, i.e. whether the recognizer is available).
bool isAvailable = sensorGestureManager->isGestureTypeAvailable( QString( com.nokia.gesture.facedown ) );
Parameters | |
---|---|
gestureType | A string identifying the wanted sensor gesture. |
Q_INVOKABLE bool | isStarted | ( | const QString & | gestureType | ) |
Check if the application is listening to the specified gesture.
bool result = sensorGestureManager->isStarted( QString(com.nokia.gesture.facedown) );
Parameters | |
---|---|
gestureType | The type of sensor gesture recognizer to be checked. |
void | recognized | ( | const QString & | gestureType, |
const QDeclarativePropertyMap & | attributes | |||
) | [signal] |
This signal is emitted when a sensor gesture is recognized.
The application needs to connect the recognized signal to its slot method that handles the gesture recognition.
connect(sensorGestureManager, SIGNAL(recognized(QString, QDeclarativePropertyMap)), this, SLOT(handleGesture(QString, QDeclarativePropertyMap)));
Parameters | |
---|---|
gestureType | The type of the recognized gesture. |
attributes | The attributes of the recognized gesture. The attributes are specified by the recognizer and can be any attribute that fits into the domain of the recognizer. The attributes must be well documented. Example:gestureType.append(QString("com.mycompany.gesture.drop"));attributes.insert("speed", velocity); |
Q_INVOKABLE bool | start | ( | const QString & | gestureType | ) |
Start listening to the specified gesture.
bool result = sensorGestureManager->start( QString(com.nokia.gesture.facedown) );
Parameters | |
---|---|
gestureType | The type of sensor gesture recognizer to be started. |