Connect signal to current model
519544
def _connect(cls):
        
        post_save.connect(
            notify_items, sender=cls,
            dispatch_uid='knocker_{0}'.format(cls.__name__)
        )
1225588
def setup_signals(self, ):
        
        prjlvl = self.prjbrws.get_level(0)
        prjlvl.new_root.connect(self.update_browsers)
        for rb in self._releasetype_button_mapping.values():
            rb.toggled.connect(self.releasetype_btn_toggled)

        shotdesclvl = self.shotbrws.get_level(3)
        shotselcb = partial(self.selection_changed,
                            source=self.shotbrws,
                            update=self.shotverbrws,
                            commentbrowser=self.shotcommentbrws,
                            mapper=self.shot_info_mapper)
        shotdesclvl.new_root.connect(shotselcb)
        shotverlvl = self.shotverbrws.get_level(0)
        shotverlvl.new_root.connect(self.shot_ver_sel_changed)
        shotmappercb = partial(self.set_mapper_index, mapper=self.shot_info_mapper)
        shotverlvl.new_root.connect(shotmappercb)
        shotverlvl.new_root.connect(partial(self.shotcommentbrws.set_root, 0))

        assetdesclvl = self.assetbrws.get_level(3)
        assetselcb = partial(self.selection_changed,
                             source=self.assetbrws,
                             update=self.assetverbrws,
                             commentbrowser=self.assetcommentbrws,
                             mapper=self.asset_info_mapper)
        assetdesclvl.new_root.connect(assetselcb)
        assetverlvl = self.assetverbrws.get_level(0)
        assetverlvl.new_root.connect(self.asset_ver_sel_changed)
        assetmappercb = partial(self.set_mapper_index, mapper=self.asset_info_mapper)
        assetverlvl.new_root.connect(assetmappercb)
        assetverlvl.new_root.connect(partial(self.assetcommentbrws.set_root, 0))

        self.current_pb.clicked.connect(self.set_to_current)
        self.asset_open_path_tb.clicked.connect(self.open_asset_path)
        self.shot_open_path_tb.clicked.connect(self.open_shot_path)
        self.refresh_tb.clicked.connect(self.refresh)
75793
def click_signal(target_usage, target_vendor_id):
    """"""
    # usually you'll find and open the target device, here we'll browse for the
    # current connected devices
    all_devices = hid.HidDeviceFilter(vendor_id = target_vendor_id).get_devices()

    if not all_devices:
        print("Can't find target device (vendor_id = 0x%04x)!" % target_vendor_id)
    else:
        # search for our target usage
        # target pageId, usageId

        for device in all_devices:
            try:
                device.open()
                # browse output reports, we could search over feature reports also,
                # changing find_output_reports() to find_feature_reports()
                for report in device.find_output_reports():
                    if target_usage in report:
                        # found out target!
                        report[target_usage] = 1 # yes, changing values is that easy
                        # at this point you could change different usages at a time...
                        # and finally send the prepared output report
                        report.send()
                        # now toggle back the signal
                        report[target_usage] = 0
                        report.send()
                        print("\nUsage clicked!\n")
                        return
            finally:
                device.close()
        print("The target device was found, but the requested usage does not exist!\n")
555554
def connect(self, protocol=None, mode=None, disposition=None):
        """"""
        self.component.connect(protocol, mode, disposition)
600867
def setModel(self, model):
        

        if not model:
            return

        LOGGER.debug("> Setting '{0}' model.".format(model))

        umbra.ui.views.Abstract_QTreeView.setModel(self, model)

        # Signals / Slots.
        self.model().modelAboutToBeReset.connect(self.__model__modelAboutToBeReset)
        self.model().modelReset.connect(self.__model__modelReset)
1335388
def setup_signals(self, ):
        
        self.duplicate_tb.clicked.connect(self.duplicate)
        self.delete_tb.clicked.connect(self.delete)
        self.load_tb.clicked.connect(self.load)
        self.unload_tb.clicked.connect(self.unload)
        self.reference_tb.clicked.connect(self.reference)
        self.importtf_tb.clicked.connect(self.import_file)
        self.importref_tb.clicked.connect(self.import_reference)
        self.replace_tb.clicked.connect(self.replace)
        self.imported_tb.clicked.connect(partial(self.toggle_tbstyle, button=self.imported_tb))
        self.alien_tb.clicked.connect(partial(self.toggle_tbstyle, button=self.alien_tb))
329124
def connect_signals(self):
        
        # Connect the signals inside each Work.
        for work in self:
            work.connect_signals()

        # Observe the nodes that must reach S_OK in order to call the callbacks.
        for cbk in self._callbacks:
            #cbk.enable()
            for dep in cbk.deps:
                logger.info("connecting %s \nwith sender %s, signal %s" % (str(cbk), dep.node, dep.node.S_OK))
                dispatcher.connect(self.on_dep_ok, signal=dep.node.S_OK, sender=dep.node, weak=False)
856776
def send(self, signal, **kwargs):
        
        return self.__app.signals.send(signal, plugin=self._plugin, **kwargs)
567759
def listens_to(name, sender=None, weak=True):
    
    def decorator(f):
        if sender:
            return signal(name).connect(f, sender=sender, weak=weak)
        return signal(name).connect(f, weak=weak)
    return decorator
1282753
def send_signal(self, signal_name, signal_args=None):
		
		try:
			self.__queues[signal_name].push(signal_args)
			for callback in self.__direct_callbacks[signal_name]:
				if callback is not None:
					callback(self, signal_name, signal_args)
		except KeyError:
			raise WUnknownSignalException('Unknown signal "%s"' % signal_name)
1155363
def listen(cls, event, func):
        """"""
        signal(event).connect(func, sender=cls)
661138
def connect(self, callback, ref=False, position='first',
                before=None, after=None):
        
        self._connect_emitters(True)
        return EventEmitter.connect(self, callback, ref, position,
                                    before, after)
1235989
def enable_signals(self):
        '''
        
        '''
        signal_dict = self.settings[self.signal_key] or {}
        for i in signal_dict.keys():
            sig_module, signal_class = self.import_class_from_path(i)
            for j in signal_dict[i]:
                recv_module, recv_coro = self.import_class_from_path(j)
                signal_class.register(recv_coro)
626616
def connect(obj, signal, slot, event_type=tango.EventType.CHANGE_EVENT):
    """"""
    return obj._helper.connect(signal, slot, event_type=event_type)
776770
def connect(self, signal, slot):
        
        super(XViewDispatch, self).connect(self, SIGNAL(signal), slot)
774145
def signal_wrapper(f):
    """"""
    @wraps(f)
    def wrapper(*args, **kwds):
        args = map(convert, args)
        kwds = {convert(k): convert(v) for k, v in kwds.items()}
        return f(*args, **kwds)
    return wrapper
807304
def connect(self):
        """"""
        try:
            for group in ('inlets', 'receivers', 'outlets', 'senders'):
                self._connect_subgroup(group)
        except BaseException:
            objecttools.augment_excmessage(
                'While trying to build the node connection of the `%s` '
                'sequences of the model handled by element `%s`'
                % (group[:-1], objecttools.devicename(self)))