SimpleSignalο
- class bapsf_motion.utils.SimpleSignalο
Bases:
objectA very simple, rudimentary class for creating signals.
Attributes Summary
List of callbacks/handlers connect to the signal.
Trueif the signal is currently blocked.Methods Summary
connect(func)Connect the callback/handler
functo the signal.disconnect([func])Disconnect the callback/handler
funcfrom the signal.Disconnect all callbacks/handlers for the signal.
emit()Emit the signal, which executes all the connected handlers.
set_blocking(block)Attributes Documentation
- handlersο
List of callbacks/handlers connect to the signal.
- is_blockingο
Trueif the signal is currently blocked. That is, nohandlerswill be executed on anemit.
Methods Documentation
- connect(func: Callable)ο
Connect the callback/handler
functo the signal. The callback should take no arguments.
- disconnect(func=None)ο
Disconnect the callback/handler
funcfrom the signal.
- disconnect_all()ο
Disconnect all callbacks/handlers for the signal.
- emit()ο
Emit the signal, which executes all the connected handlers.