viewer: overlay one plot line per processing run (with editable names)

The dataset-info plot now overlays every run as a separate named line instead of
replacing the plot when a snapshot is activated:

- Reader gains AllSnapshotDatasets() (every snapshot's dataset, Original first).
- The worker owns the run collection: a stable snapshot id plus an editable
  display label (RunData), emitted as runsChanged(runs, active_id) on file open,
  snapshot register, activate and rename. RenameRun(id, label) updates the legend
  label without touching the reader key (decoupled id vs label).
- The chart view draws the active run as the primary series (markers, hover,
  binning, axes) and the other runs as overlay lines sharing its axes, with a
  legend shown when overlaying (appendSeries factored out for both).
- The dataset-info widget holds the run list + the live run, extracts the selected
  metric from each (ExtractMetric), and unions the available metrics across runs.
- The live run is its own "Live" overlay (lightweight per-tick refresh, no combo
  rebuild); it is cleared on finish so the persisted snapshot takes over.
- The processing jobs table gets a "Started" column and an editable Name column;
  editing a name renames that run's legend label.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-22 11:28:47 +02:00
co-authored by Claude Opus 4.8
parent b735aec1c4
commit aceff23ce2
14 changed files with 358 additions and 163 deletions
+13 -2
View File
@@ -401,8 +401,15 @@ JFJochViewerWindow::JFJochViewerWindow(QWidget *parent, bool dbus, const QString
reading_worker, &JFJochImageReadingWorker::SetActiveSnapshot);
connect(processingJobsWindow, &JFJochProcessingJobsWindow::writeStatusBar,
statusbar, &JFJochViewerStatusBar::display);
connect(processingJobsWindow, &JFJochProcessingJobsWindow::renameRun,
reading_worker, &JFJochImageReadingWorker::RenameRun);
connect(reading_worker, &JFJochImageReadingWorker::httpConnectionChanged,
processingJobsWindow, &JFJochProcessingJobsWindow::onHttpConnectionChanged);
connect(reading_worker, &JFJochImageReadingWorker::runsChanged, this,
[this](QVector<RunData> runs, QString active) {
lastRuns = std::move(runs);
lastActiveRunId = std::move(active);
});
// Dock the processing panel in the bottom-right corner, next to the dataset-info plots.
auto processingDock = new QDockWidget("Processing", this);
@@ -442,6 +449,7 @@ void JFJochViewerWindow::NewDatasetInfo() {
auto info = new JFJochViewerDatasetInfo(this);
info->datasetLoaded(lastDataset);
info->imageLoaded(lastImage);
info->runsChanged(lastRuns, lastActiveRunId);
auto dock = new QDockWidget(QString("Dataset info"), this);
dock->setAllowedAreas(Qt::BottomDockWidgetArea);
@@ -458,9 +466,12 @@ void JFJochViewerWindow::NewDatasetInfo() {
info, &JFJochViewerDatasetInfo::datasetLoaded);
connect(reading_worker, &JFJochImageReadingWorker::imageLoaded,
info, &JFJochViewerDatasetInfo::imageLoaded);
// Live processing results: refresh the plots while a job runs.
// All runs (original + reprocessing snapshots) overlay as separate lines.
connect(reading_worker, &JFJochImageReadingWorker::runsChanged,
info, &JFJochViewerDatasetInfo::runsChanged);
// Live processing results: the in-progress run as its own overlay line.
connect(processingJobsWindow, &JFJochProcessingJobsWindow::liveDataset,
info, &JFJochViewerDatasetInfo::datasetLoaded);
info, &JFJochViewerDatasetInfo::liveRunUpdated);
connect(info, &JFJochViewerDatasetInfo::imageSelected,
reading_worker, &JFJochImageReadingWorker::LoadImage);
connect(toolBarDisplay, &JFJochViewerToolbarDisplay::colorMapChanged,