def weak_connect(self, signal, obj, attr, after, idle): """ Connects unbounded signal @param signal: Unbounded signal """ return weak_connect(self, signal.name, obj, attr, after=after, idle=idle)
def connect(self, signal, obj, attr, after, idle): """ Connects unbounded signal @param signal: Unbounded signal """ return weak_connect(self.sender, signal.name, obj, attr, after=after, idle=idle)
def connect_external_signals(obj, **kwargs): for attr, value in getmembers(obj.__class__, ismethod): for (sender_name, signal_name), connect_params in getattr(value, 'external_signals_to_connect', ()): sender = kwargs[sender_name] id = weak_connect(sender, signal_name, obj, attr, **connect_params) append_handler_to_object(obj, attr, id, sender, signal_name, sender_name)
def connect_external_signals(obj, **kwargs): for attr, value in obj.__class__.__dict__.iteritems(): for (sender_name, signal_name), connect_params in getattr(value, 'external_signals_to_connect', ()): sender = kwargs[sender_name] id = weak_connect(sender, signal_name, obj, attr, **connect_params) append_handler_to_object(obj, attr, id, sender, signal_name, sender_name)