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='__')
| 683 | |
| 684 | |
| 685 | def 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 |
no test coverage detected