viewer: Phase 1a — dockable shell with saved perspectives
Make the layout reconfigurable, the foundation for the redesign: - The diffraction image becomes the central widget; the right-hand side panel is now a dockable "Inspector" (QDockWidget, right area). - Every dock and toolbar gets a stable objectName so QMainWindow saveState / restoreState round-trips. Dataset-info docks are numbered uniquely. - Persist geometry + dock state to QSettings on close and restore on launch, so the user's arrangement resumes. - New "View" menu with Image / Processing perspectives (show/hide the bottom plots + jobs panel) and "Reset layout" (back to the as-built arrangement, captured at startup). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -65,6 +65,15 @@ JFJochViewerMenu::JFJochViewerMenu(QWidget *parent) : QMenuBar(parent) {
|
||||
const QAction *dockCalibration = dockMenu->addAction("New dataset info plot");
|
||||
connect(dockCalibration, &QAction::triggered, [this] { emit openDatasetInfo();});
|
||||
|
||||
QMenu *viewMenu = addMenu("View");
|
||||
const QAction *imageLayout = viewMenu->addAction("Image layout");
|
||||
connect(imageLayout, &QAction::triggered, this, &JFJochViewerMenu::imageLayoutSelected);
|
||||
const QAction *processingLayout = viewMenu->addAction("Processing layout");
|
||||
connect(processingLayout, &QAction::triggered, this, &JFJochViewerMenu::processingLayoutSelected);
|
||||
viewMenu->addSeparator();
|
||||
const QAction *resetLayout = viewMenu->addAction("Reset layout");
|
||||
connect(resetLayout, &QAction::triggered, this, &JFJochViewerMenu::resetLayoutSelected);
|
||||
|
||||
QMenu *helpMenu = addMenu("Help");
|
||||
// Add "About" action
|
||||
const QAction *aboutAction = helpMenu->addAction("About");
|
||||
|
||||
Reference in New Issue
Block a user