QSensorGestureManager

The QSensorGestureManager class manages sensor gestures, registers and creates sensor gesture plugins. More

Inheritance diagram of PySide2.QtSensors.QSensorGestureManager

Synopsis

Functions

Static functions

Detailed Description

Sensor Gesture plugins register their recognizers using the registerSensorGestureRecognizer() function.

// Create a QSensorGestureManager
    QSensorGestureManager gestureManager;

// Get a list of known recognizers
    QStringList recognizersList = gestureManager.gestureIds();

// Create a QSensorGeture object for each of those gesture recognizers
        QSensorGesture *gesture = new QSensorGesture( gestureManager.gestureIds(), this);
// Connect the known signals up.
        connect(gesture, SIGNAL(detected(QString)), this, SLOT(gestureDetected(QString)));
class PySide2.QtSensors.QSensorGestureManager([parent=Q_NULLPTR])
param parent

PySide2.QtCore.QObject

Constructs the QSensorGestureManager as a child of parent

PySide2.QtSensors.QSensorGestureManager.gestureIds()
Return type

list of strings

Returns the list of the currently registered gestures. Includes all the standard built-ins as well as available plugins.

PySide2.QtSensors.QSensorGestureManager.newSensorGestureAvailable()
PySide2.QtSensors.QSensorGestureManager.recognizerSignals(recognizerId)
Parameters

recognizerId – str

Return type

list of strings

Returns the list of all the gesture signals for the registered gestureId gesture recognizer id.

PySide2.QtSensors.QSensorGestureManager.registerSensorGestureRecognizer(recognizer)
Parameters

recognizerPySide2.QtSensors.QSensorGestureRecognizer

Return type

bool

Registers the sensor recognizer recognizer for use. QSensorGestureManager retains ownership of the recognizer object. Returns true unless the gesture has already been registered, in which case the object is deleted.

static PySide2.QtSensors.QSensorGestureManager.sensorGestureRecognizer(id)
Parameters

id – str

Return type

PySide2.QtSensors.QSensorGestureRecognizer

Returns the sensor gesture object for the recognizer id .