wip gui cleanup

This commit is contained in:
x01dc
2025-10-22 15:44:13 +02:00
parent 2b4828c10e
commit e296d47a2a

View File

@@ -24,10 +24,7 @@ from qtpy.QtWidgets import (
)
logger = bec_logger.logger
# TODO replace with actual device names, these are just placeholders from simulation framework
DEVICE_HORIZONTAL = "samx"
DEVICE_VERTICAL = "samy"
CAMERA = ("cam_flomni_overview", "preview")
CAMERA = ("cam_xeye_rgb", "image") #TODO here put correct camera
class XRayEye2DControl(BECWidget, QWidget):
@@ -150,7 +147,7 @@ class XRayEye(BECWidget, QWidget):
self.image = Image(parent=self)
self.image.enable_toolbar = False # Disable default toolbar to not allow to user set anything
self.image.inner_axes = False # Disable inner axes to maximize image area
self.image.plot_item.vb.invertY(True) # Invert y axis to match logic of LabView GUI
self.image.plot_item.vb.invertY(True) # #TODO Invert y axis to match logic of LabView GUI
# Control panel on the right: vertical layout inside a fixed-width widget
self.control_panel = QWidget(parent=self)
@@ -406,7 +403,11 @@ class XRayEye(BECWidget, QWidget):
width_x = getattr(self.dev.omny_xray_gui.width_x, f"width_x_{step}").set(roi_width)
width_y = getattr(self.dev.omny_xray_gui.width_y, f"width_y_{step}").set(roi_height)
self.dev.omny_xray_gui.submit.set(1)
def cleanup(self):
self.bec_dispatcher.disconnect_slot(self.device_updates, MessageEndpoints.device_readback("omny_xray_gui"))
getattr(self.dev,CAMERA).live_mode = False
super().cleanup()
if __name__ == "__main__":
import sys