From e296d47a2ae689e080921d4911c1bf2d6c3a9e72 Mon Sep 17 00:00:00 2001 From: x01dc Date: Wed, 22 Oct 2025 15:44:13 +0200 Subject: [PATCH] wip gui cleanup --- csaxs_bec/bec_widgets/widgets/xray_eye/x_ray_eye.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/csaxs_bec/bec_widgets/widgets/xray_eye/x_ray_eye.py b/csaxs_bec/bec_widgets/widgets/xray_eye/x_ray_eye.py index 969a7cd..406cc63 100644 --- a/csaxs_bec/bec_widgets/widgets/xray_eye/x_ray_eye.py +++ b/csaxs_bec/bec_widgets/widgets/xray_eye/x_ray_eye.py @@ -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