Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QSensorGestureRecognizer Class

The QSensorGestureRecognizer class is the base class for a sensor gesture recognizer. More...

 #include <QSensorGestureRecognizer>

Inherits: QObject.

Public Functions

QSensorGestureRecognizer(QObject * parent = 0)
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 & gestureId)

Protected Functions

virtual void create() = 0
virtual bool start() = 0
virtual bool stop() = 0
  • 9 protected functions inherited from QObject

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public slot inherited from QObject
  • 11 static public members inherited from QObject

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 = 0)

Constructs the QSensorGestureRecognizer with parent as parent.

QSensorGestureRecognizer::~QSensorGestureRecognizer() [virtual]

Destroy the QSensorGestureRecognizer

void QSensorGestureRecognizer::create() [pure virtual protected]

Called by QSensorGesture object constructor to create the recognizers backend.

Implementors would use this to instantiate QSensors and connect signals.

void QSensorGestureRecognizer::createBackend()

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

void QSensorGestureRecognizer::detected(const QString & gestureId) [signal]

Signals when the gestureId gesture has been recognized.

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.

QString QSensorGestureRecognizer::id() const [pure virtual]

Returns the identifier for this recognizer.

bool QSensorGestureRecognizer::isActive() [pure virtual]

Returns true if this recognizer is active, otherwise false.

bool QSensorGestureRecognizer::start() [pure virtual protected]

Called by QSensorGesture::startDetection() to start this recognizer. Implementors should start the sensors. Returns true if the operation is successful.

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

bool QSensorGestureRecognizer::stop() [pure virtual protected]

Called by QSensorGesture::stopDetection() to stop this recognizer. Returns true if the call succeeds, otherwise false.

Implementors should stop the sensors.

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

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web