0
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2025-07-13 19:21:50 +02:00

feat: emit 'device_selected' and 'scan_axis' from scan control widget

This commit is contained in:
2024-10-01 17:58:27 +02:00
parent 9801d2769e
commit 0b9b1a3c89

View File

@ -42,6 +42,7 @@ class ScanControl(BECWidget, QWidget):
scan_started = Signal()
scan_selected = Signal(str)
device_selected = Signal(str)
scan_axis = Signal(str, float, float)
def __init__(
@ -424,6 +425,16 @@ class ScanControl(BECWidget, QWidget):
self.arg_box.setSizePolicy(QSizePolicy.Preferred, QSizePolicy.Fixed)
self.layout.addWidget(self.arg_box)
@Slot(str)
def emit_device_selected(self, dev_names):
"""
Emit the signal to inform about selected device(s)
"dev_names" is a string separated by space, in case of multiple devices
"""
self._selected_devices = dev_names
self.device_selected.emit(dev_names)
@Slot()
def add_arg_bundle(self):
"""Adds a new argument bundle to the scan control layout."""