Exceptions: added developed help dialog to main window

This commit is contained in:
2026-02-26 17:19:27 +01:00
parent 8f59781107
commit aec1cb3050
+18
View File
@@ -19,6 +19,7 @@ from aare.gui.panels.LogPanel import LogDock
from aare.gui.panels.beamline_controls import BeamlineControls
from aare.gui.panels.data_collection_settings import DataCollectionSettings
from aare.gui.panels.developer_help_dialog import DeveloperHelpDialog
from aare.gui.panels.manual_sample_panel import ManualSamplePanel
from aare.gui.panels.reference_tools_panel import ReferenceToolsPanel
from aare.gui.panels.sample_queue_panel import SampleQueuePanel
@@ -59,6 +60,8 @@ class MainWindow(QMainWindow):
self.__base_url = base_url
self.__token = token
self.__mounting = False
self._dev_help_dialog = None
# Tutorial manager (define tutorials after widgets exist)
self.tutorial_manager = TutorialManager(self)
@@ -460,6 +463,10 @@ class MainWindow(QMainWindow):
about_action.triggered.connect(self.show_about_dialog)
help_menu.addAction(about_action)
dev_help_action = QAction("Developer / Help", self)
dev_help_action.triggered.connect(self.show_developer_help)
help_menu.addAction(dev_help_action)
help_menu.addSeparator()
start_text_tutorial_action = QAction("Start Tutorial (Text)", self)
@@ -476,6 +483,17 @@ class MainWindow(QMainWindow):
"About",
"Aare Macromolecular Crystallography GUI\nVersion: 1.0\nCopyright: Paul Scherrer Institute 2024-2025",
)
def show_developer_help(self) -> None:
if self._dev_help_dialog is None:
self._dev_help_dialog = DeveloperHelpDialog(
daq=self.daq,
is_staff=bool(getattr(self.__decoded_token, "staff", False)),
parent=self,
)
self._dev_help_dialog.refresh()
self._dev_help_dialog.show()
self._dev_help_dialog.raise_()
self._dev_help_dialog.activateWindow()
@Slot(str)
def show_sample_missing_dialog(self, msg: str):