GUI: camera_image.py change colour of beam marker based on shutter status

This commit is contained in:
2025-11-25 09:06:58 +01:00
parent 73c8f1e3be
commit a45aae8372
+8
View File
@@ -66,6 +66,7 @@ class SampleCameraImageLabel(QGraphicsView):
):
super().__init__(parent)
self.__shutter = None
self.__raster_mgr = raster
self.__state = SampleCameraImageState.IDLE
self.__session_state: SessionsStateEnum | None = None
@@ -435,6 +436,9 @@ class SampleCameraImageLabel(QGraphicsView):
self.__session_state = new_session_state
self.update()
if s.bl.shutter_open != self.__shutter:
self.__shutter = s.bl.shutter_open
if s.busy != self.__is_daq_busy:
self.__is_daq_busy = s.busy
self.update()
@@ -555,6 +559,10 @@ class SampleCameraImageLabel(QGraphicsView):
if self.__state == SampleCameraImageState.BEAM_MARKING:
painter.setPen(QPen(QColor(102, 51, 153), 3, Qt.PenStyle.SolidLine))
elif self.__shutter:
painter.setPen(QPen(QColor(0, 255, 0), 3, Qt.PenStyle.SolidLine))
elif self.__is_daq_busy is True:
# Use red color to indicate busy state
painter.setPen(QPen(QColor(255, 0, 0), 3, Qt.PenStyle.SolidLine))