Files
Jungfraujoch/viewer/JFJochViewerMenu.h
T
leonarski_fandClaude Opus 4.8 a7c1560dcb viewer: toolbar rework — icons, prominent scrubber, HTTP states (g–k)
Complete pass over both toolbars (review items g–k), closing the toolbar topic.

New ToolbarIcons: crisp QPainter vector glyphs (Qt SVG is not a build dep), with
white "on" variants for toggles and a shared flat button style (coral hover,
navy checked).

Navigation toolbar, laid out source-first:
- Open (3.5" diskette) · HTTP sync · Movie (reel-on-top camera, distinct from
  the next/play triangle) ║ the scrub slider, which expands to fill the bar
  (coral track, navy handle) so it is the obvious way to move across the data ║
  precise navigation: first/prev/[number]/next/last, Jump, Sum.
- Open and HTTP-sync reach the file / connect dialogs (JFJochViewerMenu
  openSelected and openHttpSelected, now public).
- HTTP-sync has three states via a status dot (grey disconnected / green live /
  amber frozen); clicking with no live source attached opens the connect dialog.
  Removed the separate "Reanalyze" toggle.

Display toolbar:
- Styled foreground slider (matching), Auto/HDR as styled text toggles.

Hero buttons:
- "Reanalyze image" is now a toggle (worker ReanalyzeImages: run now + keep
  re-analysing on image/settings/processing changes; coral = active).

Processing dock:
- Drop the "New job…" toolbar action (the hero button drives it) and parent the
  job dialog to the main window instead of the dock.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 16:26:15 +02:00

62 lines
1.9 KiB
C++

// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#pragma once
#include <QMenuBar>
#include "windows/JFJochHelperWindow.h"
class JFJochLicenseWindow;
class QDockWidget;
class JFJochViewerMenu : public QMenuBar {
Q_OBJECT
QAction *toggleImageWindowAction = nullptr;
QAction *toggleMetadataWindowAction = nullptr;
QAction *toggleSpotWindowAction = nullptr;
QAction *toggleReflectionWindowAction = nullptr;
QAction *toggleProcessingWindowAction = nullptr;
QAction *toggleCalibrationWindowAction = nullptr;
QMenu *windowMenu = nullptr;
JFJochLicenseWindow *licenseWindow = nullptr;
public:
explicit JFJochViewerMenu(QWidget *parent = nullptr);
~JFJochViewerMenu() override = default;
void AddWindowEntry(JFJochHelperWindow *window, const QString &name);
// Adds a dock's show/hide toggle to the Window menu (for docked panels).
void AddDockEntry(QDockWidget *dock, const QString &name);
public slots:
void openSelected(); // also reachable from the toolbar's open-dataset button
void openHttpSelected(); // also reachable from the toolbar's HTTP-sync button
signals:
void fileOpenSelected(const QString &filename, qint64 image_number, qint64 summation, bool retry);
void fileCloseSelected();
void saveUserMaskTiffSelected(const QString &filename);
void loadUserMaskTiffSelected(const QString &filename, bool replace);
void uploadUserMaskSelected();
void clearUserMaskSelected();
void openDatasetInfo();
void imageLayoutSelected();
void processingLayoutSelected();
void resetLayoutSelected();
private slots:
void aboutSelected();
void licensesSelected();
void quitSelected();
void closeSelected();
void saveUserMaskAsTiffSelected();
void uploadUserMaskAction();
private:
void openLoadUserMaskTiff(bool replace);
};