Files
Jungfraujoch/viewer/RunData.h
T
leonarski_f aceff23ce2 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>
2026-06-22 11:28:47 +02:00

23 lines
646 B
C++

// SPDX-FileCopyrightText: 2026 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#pragma once
#include <QString>
#include <QVector>
#include <QMetaType>
#include <memory>
#include "../reader/JFJochReaderDataset.h"
// One processing run (the original file or a reprocessing snapshot), for overlaying its plots.
// id is the stable reader-snapshot key; label is the editable display name shown in the legend.
struct RunData {
QString id;
QString label;
std::shared_ptr<const JFJochReaderDataset> dataset;
};
Q_DECLARE_METATYPE(RunData)
Q_DECLARE_METATYPE(QVector<RunData>)