Package _Framework :: Module Signal :: Class Signal
[hide private]
[frames] | no frames]

Class Signal

source code

object --+
         |
        Signal

A signal object implements the observer pattern. It can be connected to any number of slots (i.e. callbacks). Whenever the signal is called, all the slots are called.

The return value of this function will depend on the combiner. The combiner takes a generator of slot results and returns a value. The slots whose results are not evaluated are not called.

Instance Methods [hide private]
 
__init__(self, combiner=<function default_combiner at 0x101bc62a8>, sender=None, *a, **k)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
connect(self, slot, in_front=False, sender=None)
Connects the signal to the slot.
source code
 
disconnect(self, slot) source code
 
disconnect_all(self) source code
 
is_connected(self, slot) source code
 
__call__(self, *a, **k) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]
  count

Inherited from object: __class__

Method Details [hide private]

__init__(self, combiner=<function default_combiner at 0x101bc62a8>, sender=None, *a, **k)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

connect(self, slot, in_front=False, sender=None)

source code 

Connects the signal to the slot. Does nothing if the slot is already connected. Returns the wrapper object that is used as a slot.

If 'in_front' is True, the slot will be put first, meaning it will be called before previously registered slots (by default it is put last).

If 'sender' is not None, it will be passed as last ordinal parameter to the slot when the signal is dispatched.


Property Details [hide private]

count

Get Method:
unreachable.count(self)