QSensorGestureRecognizer¶
The
QSensorGestureRecognizer
class is the base class for a sensor gesture recognizer. More…
Synopsis¶
Functions¶
def
createBackend
()def
gestureSignals
()def
startBackend
()def
stopBackend
()
Virtual functions¶
Signals¶
def
detected
(arg__1)
Detailed Description¶
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
- class PySide2.QtSensors.QSensorGestureRecognizer([parent=Q_NULLPTR])¶
- param parent:
Constructs the
QSensorGestureRecognizer
withparent
as parent.
- PySide2.QtSensors.QSensorGestureRecognizer.create()¶
Called by
QSensorGesture
object constructor to create the recognizers backend.Implementors would use this to instantiate QSensors and connect signals.
- PySide2.QtSensors.QSensorGestureRecognizer.createBackend()¶
Calls
create()
if the recognizer is valid.
- PySide2.QtSensors.QSensorGestureRecognizer.detected(arg__1)¶
- Parameters:
arg__1 – str
- PySide2.QtSensors.QSensorGestureRecognizer.gestureSignals()¶
- Return type:
list of strings
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.
- PySide2.QtSensors.QSensorGestureRecognizer.id()¶
- Return type:
str
Returns the identifier for this recognizer.
- PySide2.QtSensors.QSensorGestureRecognizer.isActive()¶
- Return type:
bool
Returns true if this recognizer is active, otherwise false.
- PySide2.QtSensors.QSensorGestureRecognizer.start()¶
- Return type:
bool
Called by
startDetection()
to start this recognizer. Implementors should start the sensors. Returns true if the operation is successful.
- PySide2.QtSensors.QSensorGestureRecognizer.startBackend()¶
Calls
start()
if the recognizer isn’t already initialized. This is called by theQSensorGesture
object, so please use that instead.See also
startDetection()
- PySide2.QtSensors.QSensorGestureRecognizer.stop()¶
- Return type:
bool
Called by
stopDetection()
to stop this recognizer. Returns true if the call succeeds, otherwise false.Implementors should stop the sensors.
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.