From 1df0ada163ca8616a45b998de579e2891a4af3a9 Mon Sep 17 00:00:00 2001 From: appleb_m Date: Wed, 22 Apr 2026 16:05:57 +0200 Subject: [PATCH] GUI: added shortcuts and to info to the README.md --- README.md | 49 +++++++++++++++++++++++ src/aare/gui/panels/sample_queue_panel.py | 5 +++ 2 files changed, 54 insertions(+) diff --git a/README.md b/README.md index f3954314..ddcd28f4 100644 --- a/README.md +++ b/README.md @@ -1 +1,50 @@ # Readme + +## GUI Controls Cheat Sheet + +### Sample Camera +- `Left click`: move sample to clicked position +- `Shift + Left click`: Z-alignment click behaviour +- `Ctrl + Left click` on active raster grid: move to clicked position under the grid +- `Left drag` on active raster grid: move active raster grid +- `Right click`: open sample camera context menu +- `Right drag` on empty area: draw raster grid +- `Right drag` on active raster grid: resize raster grid +- `Mouse wheel`: rotate omega by 90° +- `Shift + Mouse wheel`: rotate omega by 10° +- `Ctrl + Mouse wheel`: change sample camera exposure by a large step +- `Alt + Mouse wheel`: change sample camera exposure by a small step +- `Shift + Mouse move`: inspect/load raster image under cursor + +### Video Views +- `Ctrl + Mouse wheel`: zoom in/out +- `F`: fit to view +- `R`: reset zoom +- `+` or `=`: zoom in +- `-`: zoom out + +### Sample Queue +- `Delete`: remove selected samples +- `Space`: run / pause queue automation + +### Workflow Panel +- `Delete`: remove selected queue items +- `Space`: pause / resume workflow +- `Ctrl + R`: refresh workflow queue +- `Ctrl + Delete`: clear non-running workflow queue items + +### Global Shortcuts +- `F1`: open mouse / keyboard controls help +- `Ctrl + Q`: quit application +- `Ctrl + Shift + R`: restore default view layout +- `Ctrl + 1`: switch to Sample camera tab +- `Ctrl + 2`: switch to Gonio camera tab +- `Ctrl + 3`: switch to Beamline view tab +- `Ctrl + 4`: switch to Beamline combined view tab +- `Ctrl + L`: raise Sample List panel +- `Ctrl + J`: raise Automation list panel +- `Ctrl + M`: go to Sample camera tab +- `Ctrl + W`: toggle Workflow panel +- `Ctrl + Shift + T`: toggle Target stability panel +- `Ctrl + Shift + P`: toggle Prediction Metrics panel +- `Ctrl + Shift + S`: toggle Smargon trace panel \ No newline at end of file diff --git a/src/aare/gui/panels/sample_queue_panel.py b/src/aare/gui/panels/sample_queue_panel.py index 09ac5f5c..fae580e3 100644 --- a/src/aare/gui/panels/sample_queue_panel.py +++ b/src/aare/gui/panels/sample_queue_panel.py @@ -63,8 +63,13 @@ class SampleQueuePanel(QFrame): # Set up keyboard shortcut for delete self.delete_shortcut = QShortcut(QKeySequence.StandardKey.Delete, self.table_view) + self.delete_shortcut.setContext(Qt.ShortcutContext.WidgetWithChildrenShortcut) self.delete_shortcut.activated.connect(self.remove_selected_samples) + self.run_pause_shortcut = QShortcut(QKeySequence(Qt.Key.Key_Space), self.table_view) + self.run_pause_shortcut.setContext(Qt.ShortcutContext.WidgetWithChildrenShortcut) + self.run_pause_shortcut.activated.connect(self.run) + layout.addWidget(self.table_view) # Add table to the layout # Create a horizontal layout for the buttons