mirror of
https://github.com/bec-project/bec_widgets.git
synced 2025-07-14 03:31:50 +02:00
feat: emit 'device_selected' and 'scan_axis' from scan control widget
This commit is contained in:
@ -42,6 +42,7 @@ class ScanControl(BECWidget, QWidget):
|
|||||||
|
|
||||||
scan_started = Signal()
|
scan_started = Signal()
|
||||||
scan_selected = Signal(str)
|
scan_selected = Signal(str)
|
||||||
|
device_selected = Signal(str)
|
||||||
scan_axis = Signal(str, float, float)
|
scan_axis = Signal(str, float, float)
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
@ -424,6 +425,16 @@ class ScanControl(BECWidget, QWidget):
|
|||||||
self.arg_box.setSizePolicy(QSizePolicy.Preferred, QSizePolicy.Fixed)
|
self.arg_box.setSizePolicy(QSizePolicy.Preferred, QSizePolicy.Fixed)
|
||||||
self.layout.addWidget(self.arg_box)
|
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()
|
@Slot()
|
||||||
def add_arg_bundle(self):
|
def add_arg_bundle(self):
|
||||||
"""Adds a new argument bundle to the scan control layout."""
|
"""Adds a new argument bundle to the scan control layout."""
|
||||||
|
Reference in New Issue
Block a user