puzzlestream.backend.signal module

Signal module.

contains PSSignal

class puzzlestream.backend.signal.PSSignal[source]

Bases: object

Basic signal class.

This class is necessary because QGraphicsItems cannot have Qt signals. Any method can be connected to and disconnected from this signal.

connect(method: Callable)[source]

Connect method method to signal.

Args:

method (func): Method that will be run when signal is emitted.

property connectedMethods
disconnect(method: Callable)[source]

Disconnect method method from signal.

Args:

method (func): Method to be disconnected from the signal.

emit(*args)[source]

Emit signal and run all connected methods.

Args:

*args: Any arguments are passed to the connected functions.