XQSensorGestureManager Class Reference

#include <mw/sensorgesture/xqsensorgesturemanager.h>

Link against: sensorgesturemanager.lib

class XQSensorGestureManager : public QObject, public QObject

Inherits from

  • XQSensorGestureManager
    Public Properties
    QStringList gestureTypes
    Public Member Functions
    XQSensorGestureManager(QObject *)
    Q_INVOKABLE QStringListgestureTypes()
    Q_INVOKABLE boolisGestureTypeAvailable(const QString &)
    Q_INVOKABLE boolisStarted(const QString &)
    Q_INVOKABLE boolstart(const QString &)
    Q_INVOKABLE voidstop(const QString &)
    Q_INVOKABLE voidstopAll()
    Public Signals
    voidgestureTypesChanged()
    voidrecognized(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()

    Detailed Description

    The XQSensorGestureManager class allows applications to respond to different sensor gestures.

    Properties Documentation

    gestureTypes

    QStringList gestureTypes

    Returns the complete list of avaliable gesture recognizers that are supported.

    Example usage:
        QStringList availableGestures = sensorGestureManager->gestureTypes();

    Constructor & Destructor Documentation

    XQSensorGestureManager ( QObject * )

    XQSensorGestureManager(QObject *parent = 0)[explicit]

    Constructors a XQSensorGestureManager object.

    Example usage:
        XQSensorGestureManager* sensorGestureManager = new XQSensorGestureManager();
    Parameters
    parentthe object to be set as parent.

    Member Function Documentation

    gestureTypes ( )

    Q_INVOKABLE QStringListgestureTypes()const

    gestureTypesChanged ( )

    voidgestureTypesChanged()[signal]

    This signal is emitted when new recognizers have been installed or when existing recognizers have been uninstalled.

    isGestureTypeAvailable ( const QString & )

    Q_INVOKABLE boolisGestureTypeAvailable(const QString &gestureType)const

    Determines if a specific sensor gesture can be recognized, i.e. whether the recognizer is available).

    Example usage:
        bool isAvailable = sensorGestureManager->isGestureTypeAvailable(
                                     QString( com.nokia.gesture.facedown ) );
    Parameters
    gestureTypeA string identifying the wanted sensor gesture.
    Return Value
    true if a sensor gesture recognizer is available for the wanted gesture type, false otherwise.

    isStarted ( const QString & )

    Q_INVOKABLE boolisStarted(const QString &gestureType)

    Check if the application is listening to the specified gesture.

    Example usage:
        bool result = sensorGestureManager->isStarted( QString(com.nokia.gesture.facedown) );
    Parameters
    gestureTypeThe type of sensor gesture recognizer to be checked.
    Return Value
    true if the specified sensor gesture recognizer is started by the Application, false otherwise.

    recognized ( const QString &, const QDeclarativePropertyMap & )

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

    Example usage:
            connect(sensorGestureManager, SIGNAL(recognized(QString, QDeclarativePropertyMap)),
                this, SLOT(handleGesture(QString, QDeclarativePropertyMap)));
    Parameters
    gestureTypeThe type of the recognized gesture.
    attributesThe 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);

    start ( const QString & )

    Q_INVOKABLE boolstart(const QString &gestureType)

    Start listening to the specified gesture.

    Example usage:
        bool result = sensorGestureManager->start( QString(com.nokia.gesture.facedown) );
    Parameters
    gestureTypeThe type of sensor gesture recognizer to be started.
    Return Value
    true if the specified sensor gesture recognizer is started correctly, false otherwise.

    stop ( const QString & )

    Q_INVOKABLE voidstop(const QString &gestureType)

    Stop receiving signals from the specified gesture recognizer.

    Example usage:
        sensorGestureManager->stop( QString(com.nokia.gesture.facedown) );
    Parameters
    gestureTypeThe type of sensor gesture recognizer to be stopped.

    stopAll ( )

    Q_INVOKABLE voidstopAll()

    Stop receiving signals from all the gesture recognizers started by the application.

    Example usage:
        sensorGestureManager->stopAll();