From bb447b15670addb7fb339db41690abbe21b7533a Mon Sep 17 00:00:00 2001 From: Dawn Date: Thu, 13 Aug 2026 11:46:45 +0200 Subject: [PATCH] feat: rename Monochromator panel to Beamline Setup, add WIP beam-to-box row Display title only; class and file keep their names. New full-width 'Move Beam to Box (center) (WIP)' button under the Energy row, disabled with a coming-soon tooltip until a DAQ endpoint exists. Co-Authored-By: Claude Fable 5 --- src/aare/gui/panels/monochromator_panel.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/aare/gui/panels/monochromator_panel.py b/src/aare/gui/panels/monochromator_panel.py index 29f3ebe3..e94224eb 100644 --- a/src/aare/gui/panels/monochromator_panel.py +++ b/src/aare/gui/panels/monochromator_panel.py @@ -8,13 +8,20 @@ from aare.gui.widgets.title_label import TitleLabel class MonochromatorPanel(QWidget): mono_pitch_scan = Signal() change_energy = Signal(float) + move_beam_to_box = Signal() def __init__(self, parent=None): super().__init__(parent) grid_layout = QGridLayout(self) grid_layout.addWidget( - TitleLabel("Monochromator", self, collapsible=True, default_collapsed=False), 0, 0, 1, 3 + TitleLabel( + "Beamline Setup", self, collapsible=True, default_collapsed=False + ), + 0, + 0, + 1, + 3, ) self.mono_pitch_scan_button = QPushButton("Mono Pitch Rock and Go to Max", parent=self) @@ -38,6 +45,16 @@ class MonochromatorPanel(QWidget): self.change_energy_button.clicked.connect(self._emit_change_energy) grid_layout.addWidget(self.change_energy_button, 2, 2) + # TODO(wire backend): no DAQ endpoint exists yet for moving the beam + # to the box center — shown disabled as WIP until the operation is + # defined server-side; then drop "(WIP)", enable, and connect the + # signal in main_window. + self.move_beam_to_box_button = QPushButton("Move Beam to Box (center) (WIP)", parent=self) + self.move_beam_to_box_button.setToolTip("Coming soon — not functional yet.") + self.move_beam_to_box_button.setEnabled(False) + self.move_beam_to_box_button.clicked.connect(self.move_beam_to_box.emit) + grid_layout.addWidget(self.move_beam_to_box_button, 3, 0, 1, 3) + @Slot() def _emit_change_energy(self): self.change_energy.emit(float(self.energy_spin.value()) * 1000.0)