26#ifndef OPENSWMMVIS_PLOT_OBSERVEDCSVRUNLAYER_H
27#define OPENSWMMVIS_PLOT_OBSERVEDCSVRUNLAYER_H
57 static std::unique_ptr<ObservedCsvRunLayer>
load(
61 QString *errorOut =
nullptr);
67 const QStringList&
columnLabels() const noexcept {
return m_labels; }
70 const QString&
sourcePath() const noexcept {
return m_path; }
92 static bool parseRow_(
const QString& line,
94 double& timeJulianOut,
95 std::vector<double>& valuesOut,
96 double hoursSinceStartFallbackBase);
102 QStringList m_labels;
103 std::vector<double> m_timesJulian;
104 QHash<QString, std::vector<double>> m_byLabel;
Per-project flow-units state + label helpers.
Definition unitsystem.h:28
Abstract source backing one comparison-plot run.
Definition irunlayer.h:171
Definition observedcsvrunlayer.h:40
double startDateJulian() const override
Start date of the simulation as SWMM Julian, or NaN if unknown.
Definition observedcsvrunlayer.cpp:148
void getSeriesAt(const ObjectRef &ref, PlotAttribute attr, SeriesData &out) const override
Resolve a series. Returns timesJulian + values for the spec. Implementations are responsible for reso...
Definition observedcsvrunlayer.cpp:181
~ObservedCsvRunLayer() override=default
static std::unique_ptr< ObservedCsvRunLayer > load(const QString &path, PlotAttribute defaultAttr, UnitSystem unitSys=UnitSystem::SI, QString *errorOut=nullptr)
Load a CSV / TSV file and assign all its columns to a single chart attribute (the row they land on).
Definition observedcsvrunlayer.cpp:48
const QStringList & columnLabels() const noexcept
Column labels for all loaded series — order matches the CSV's column order. Useful for the dialog to ...
Definition observedcsvrunlayer.h:67
int reportStepSeconds() const override
Report step in seconds. 0 if unknown.
Definition observedcsvrunlayer.cpp:159
int periodCount() const override
Total number of time periods available (grows during live mode).
Definition observedcsvrunlayer.cpp:154
QString scenarioName() const override
Human label shown in the SeriesPanel tree + legends.
Definition observedcsvrunlayer.cpp:143
bool supportsAttribute(PlotAttribute attr) const override
Convenience: does this source carry the given attribute at all? Default impl returns true; subclasses...
Definition observedcsvrunlayer.cpp:171
QString persistenceKey() const override
Stable identity string for .oswp round-trip. Defaults to the scenario name; subclasses may override w...
Definition observedcsvrunlayer.cpp:166
const QString & sourcePath() const noexcept
File path used to load.
Definition observedcsvrunlayer.h:70
UnitSystem unitSystem() const override
Unit system the source advertises (drives axis labels).
Definition observedcsvrunlayer.h:74
Slice BL — abstract "data-source" that the ComparisonPlotModel reads timeseries from.
Definition chartproperties.h:34
PlotAttribute
What a series plots. One row per attribute in the Nx2 grid.
Definition plotattribute.h:38
EdgeRef ref
Definition pslgminsize.cpp:377
int path
Definition pslgminsize.cpp:234
Identifies what object a series is about. Kind is the discriminator; the active union member is impli...
Definition irunlayer.h:38
Result of one series resolution. Times are SWMM DateTime doubles (OLE-Automation epoch,...
Definition irunlayer.h:151