feat: rename Monochromator panel to Beamline Setup, add WIP beam-to-box row
CI / lint (push) Skipped
CI / test (3.11) (push) Skipped
CI / test (3.12) (push) Skipped
CI / test (3.13) (push) Skipped
CI / test-with-beamline-plugins (pxi_bec) (push) Skipped
CI / test-with-beamline-plugins (pxii_bec) (push) Skipped
CI / test-with-beamline-plugins (pxiii_bec) (push) Skipped
CI / lint (push) Skipped
CI / test (3.11) (push) Skipped
CI / test (3.12) (push) Skipped
CI / test (3.13) (push) Skipped
CI / test-with-beamline-plugins (pxi_bec) (push) Skipped
CI / test-with-beamline-plugins (pxii_bec) (push) Skipped
CI / test-with-beamline-plugins (pxiii_bec) (push) Skipped
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user