MCPcopy Create free account
hub / github.com/LabPy/lantz / connect_setup

Function connect_setup

lantz/ui/widgets.py:685–703  ·  view source on GitHub ↗

Connect all children widget to their corresponding :param parent: parent widget. :param targets: iterable of drivers. :param prefix: prefix to be prepended to the lantz feature name if None, the driver name will be used (default) if it is a dict, th

(parent, targets, *, prefix=None, sep='__')

Source from the content-addressed store, hash-verified

683
684
685def connect_setup(parent, targets, *, prefix=None, sep='__'):
686 """Connect all children widget to their corresponding
687
688 :param parent: parent widget.
689 :param targets: iterable of drivers.
690 :param prefix: prefix to be prepended to the lantz feature name
691 if None, the driver name will be used (default)
692 if it is a dict, the driver name will be used to obtain
693 he prefix.
694 """
695
696 logger.debug('Connecting {} to {}, {}, {}'.format(parent, targets, prefix, sep))
697
698 ChildrenWidgets.patch(parent)
699 for target in targets:
700 name = target.name
701 if isinstance(prefix, dict):
702 name = prefix[name]
703 connect_driver(parent, target, prefix=name, sep=sep)
704
705
706

Callers 2

backendMethod · 0.85
start_guiFunction · 0.85

Calls 2

connect_driverFunction · 0.85
patchMethod · 0.80

Tested by

no test coverage detected