QSensorGestureRecognizerclass is the base class for a sensor gesture recognizer. 更多 …
def
createBackend
()
def
gestureSignals
()
def
startBackend
()
def
stopBackend
()
QSensorGesturerecognizer 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
QSensorGestureobject at runtime.另请参阅
QSensorGestureRecognizer
(
[
parent=Q_NULLPTR
]
)
¶
- param parent
QObject
构造
QSensorGestureRecognizer
with
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
(
)
¶
调用
create()
if the recognizer is valid.
PySide2.QtSensors.QSensorGestureRecognizer.
detected
(
arg__1
)
¶
arg__1 – unicode
PySide2.QtSensors.QSensorGestureRecognizer.
gestureSignals
(
)
¶
字符串列表
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
(
)
¶
unicode
Returns the identifier for this recognizer.
PySide2.QtSensors.QSensorGestureRecognizer.
isActive
(
)
¶
bool
Returns true if this recognizer is active, otherwise false.
PySide2.QtSensors.QSensorGestureRecognizer.
start
(
)
¶
bool
Called by
startDetection()
to start this recognizer. Implementors should start the sensors. Returns true if the operation is successful.
PySide2.QtSensors.QSensorGestureRecognizer.
startBackend
(
)
¶
调用
start()
if the recognizer isn’t already initialized. This is called by the
QSensorGesture
object, so please use that instead.
另请参阅
startDetection()
PySide2.QtSensors.QSensorGestureRecognizer.
stop
(
)
¶
bool
Called by
stopDetection()
to stop this recognizer. Returns true if the call succeeds, otherwise false.
Implementors should stop the sensors.