viewer: hit-feed polish — stacked docks, hidden processing, resolution mode

Follow-up to the image strip, addressing the review:

- Composition: stack the plots and the thumbnail strip vertically (plots on top
  with more height, strip below) instead of sharing horizontal space — both
  benefit from width, and the strip needs less height.
- Processing dock is hidden by default and narrower; it reveals itself only when
  a reprocessing job starts (new jobStarted signal), and the Processing
  perspective no longer force-shows it.
- Thumbnail spot overlays now use the same feature (indexed) / spot colours as
  the main viewer, and follow the side-panel colour pickers.
- New strip selection modes "Resolution" and "Background": pick images that span
  that metric's distribution (a quick histogram-representative selection).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-23 16:26:15 +02:00
co-authored by Claude Opus 4.8
parent c62cd99566
commit 7d24cdba4f
6 changed files with 57 additions and 7 deletions
+18 -6
View File
@@ -518,7 +518,8 @@ JFJochViewerWindow::JFJochViewerWindow(QWidget *parent, bool dbus, const QString
connect(settingsPanel, &JFJochViewerSettingsDock::ringsFromCalibration,
side_panel, &JFJochViewerSidePanel::SetRings);
// Dock the processing panel in the bottom-right corner, next to the dataset-info plots.
// Processing panel: hidden by default and narrower; it reveals itself (to the right of the
// plots) only when a reprocessing job starts.
processingDock = new QDockWidget("Processing", this);
processingDock->setObjectName("processingDock");
processingDock->setAllowedAreas(Qt::BottomDockWidgetArea);
@@ -528,19 +529,26 @@ JFJochViewerWindow::JFJochViewerWindow(QWidget *parent, bool dbus, const QString
addDockWidget(Qt::BottomDockWidgetArea, processingDock);
if (lastDatasetInfoDock) {
splitDockWidget(lastDatasetInfoDock, processingDock, Qt::Horizontal);
resizeDocks({lastDatasetInfoDock, processingDock}, {650, 350}, Qt::Horizontal);
// Give the bottom area generous height: the per-dataset plot is a headline feature, so it
// gets real room rather than a thin strip.
resizeDocks({lastDatasetInfoDock, processingDock}, {420, 420}, Qt::Vertical);
resizeDocks({lastDatasetInfoDock, processingDock}, {900, 280}, Qt::Horizontal);
}
processingDock->hide();
menuBar->AddDockEntry(processingDock, "Processing");
connect(processingJobsWindow, &JFJochProcessingJobsWindow::jobStarted, this, [this] {
processingDock->show();
processingDock->raise();
});
// Image strip / hit feed: thumbnails of representative images, rendered off-thread; click opens.
// Stacked below the plots — both want vertical room, and the strip needs less of it.
auto *imageStrip = new JFJochViewerImageStrip(this);
imageStripDock = new QDockWidget("Image strip", this);
imageStripDock->setObjectName("imageStripDock");
imageStripDock->setWidget(imageStrip);
addDockWidget(Qt::BottomDockWidgetArea, imageStripDock);
if (lastDatasetInfoDock) {
splitDockWidget(lastDatasetInfoDock, imageStripDock, Qt::Vertical);
resizeDocks({lastDatasetInfoDock, imageStripDock}, {340, 180}, Qt::Vertical);
}
menuBar->AddDockEntry(imageStripDock, "Image strip");
connect(reading_worker, &JFJochImageReadingWorker::datasetLoaded,
imageStrip, &JFJochViewerImageStrip::datasetLoaded);
@@ -552,6 +560,10 @@ JFJochViewerWindow::JFJochViewerWindow(QWidget *parent, bool dbus, const QString
reading_worker, &JFJochImageReadingWorker::LoadImage);
connect(toolBarDisplay, &JFJochViewerToolbarDisplay::colorMapChanged,
reading_worker, &JFJochImageReadingWorker::SetThumbnailColorMap);
connect(side_panel, &JFJochViewerSidePanel::setFeatureColor,
reading_worker, &JFJochImageReadingWorker::SetThumbnailFeatureColor);
connect(side_panel, &JFJochViewerSidePanel::setSpotColor,
reading_worker, &JFJochImageReadingWorker::SetThumbnailSpotColor);
connect(menuBar, &JFJochViewerMenu::imageLayoutSelected, this,
[this] { ApplyPerspective(Perspective::Image); });
@@ -583,8 +595,8 @@ void JFJochViewerWindow::ApplyPerspective(Perspective p) {
const bool processing = (p == Perspective::Processing);
if (inspectorDock) inspectorDock->setVisible(true);
if (settingsDock) settingsDock->setVisible(processing);
if (processingDock) processingDock->setVisible(processing);
if (imageStripDock) imageStripDock->setVisible(processing);
if (processingDock && !processing) processingDock->hide(); // shows only when a job starts
for (auto *d : findChildren<QDockWidget *>())
if (d->objectName().startsWith("datasetInfoDock"))
d->setVisible(processing);