GUI: status bar uses new BeamlineStateEnum display_name
This commit is contained in:
@@ -171,29 +171,7 @@ class StatusBar(QStatusBar):
|
||||
else:
|
||||
self.pgroup_label.setText(f"Inactive p-group ")
|
||||
|
||||
stateEnum = status.state
|
||||
if stateEnum == BeamlineStateEnum.SampleExchange:
|
||||
state = "Sample exchange"
|
||||
elif stateEnum == BeamlineStateEnum.SampleAlignment:
|
||||
state = "Sample alignment"
|
||||
elif stateEnum == BeamlineStateEnum.DataCollection:
|
||||
state = "Data collection"
|
||||
elif stateEnum == BeamlineStateEnum.XrayFluorescence:
|
||||
state = "X-ray fluorescence"
|
||||
elif stateEnum == BeamlineStateEnum.DewarTransfer:
|
||||
state = "Dewar transfer"
|
||||
elif stateEnum == BeamlineStateEnum.Maintenance:
|
||||
state = "Maintenance"
|
||||
elif stateEnum == BeamlineStateEnum.Moving:
|
||||
state = "Moving"
|
||||
elif stateEnum == BeamlineStateEnum.BeamLocation:
|
||||
state = "Beam location"
|
||||
elif stateEnum == BeamlineStateEnum.RobotSampleExchange:
|
||||
state = "Robot sample exchange"
|
||||
else:
|
||||
state = "-"
|
||||
|
||||
self.state_label.setText(f"""State: {state} """)
|
||||
self.state_label.setText(f"""State: {status.state.display_name()} """)
|
||||
|
||||
if status.busy:
|
||||
busy_flag = """ <span style="color: red; "> Busy 🔒 </span>"""
|
||||
@@ -456,7 +434,8 @@ class StatusBar(QStatusBar):
|
||||
BeamlineStateEnum.DewarTransfer,
|
||||
BeamlineStateEnum.BeamLocation,
|
||||
BeamlineStateEnum.DataCollection,
|
||||
BeamlineStateEnum.XrayFluorescence]:
|
||||
BeamlineStateEnum.XrayFluorescence,
|
||||
BeamlineStateEnum.XtalSnapshot]:
|
||||
action_1 = menu.addAction("Sample alignment")
|
||||
action_1.triggered.connect(self.sa)
|
||||
elif self.__status.state in [BeamlineStateEnum.SampleAlignment, ]:
|
||||
|
||||
Reference in New Issue
Block a user