![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
Model layer for the Comparison Plot Dialog. More...
#include <comparisonplotmodel.h>
Signals | |
| void | runSourceAdded (int runIndex) |
| void | runSourceRemoved (int runIndex) |
| void | baselineChanged (int runIndex) |
| void | seriesAdded (int seriesIndex) |
| void | seriesRemoved (int seriesIndex) |
| void | styleChanged (int seriesIndex) |
| void | rowsChanged () |
| void | animationTimeChanged (QDateTime t) |
| void | pairsChanged () |
| Phase 5 — the 1v1 pair list changed (add/remove/clear or reindex after a series removal). | |
Public Member Functions | |
| ComparisonPlotModel (QObject *parent=nullptr) | |
| ~ComparisonPlotModel () override | |
| int | addRunSource (RunSource src) |
| Append a run. Returns the new run's index. | |
| void | removeRunSource (int runIndex) |
| Remove a run by index. All SeriesSpec entries referencing the removed run are dropped first; remaining specs have their runIndex shifted down where appropriate. | |
| int | runSourceCount () const noexcept |
| const RunSource & | runSource (int i) const |
| RunSource & | runSource (int i) |
| int | findRunByLayer (const IRunLayer *layer) const |
| Find run by IRunLayer pointer; -1 if not found. | |
| void | setBaseline (int runIndex) |
| Mark a run as baseline. -1 clears the baseline. | |
| int | baselineRunIndex () const noexcept |
| int | addSeries (SeriesSpec spec) |
Append a series spec. Auto-assigns a default style cycle if spec.style is the default-constructed style. Returns the series index. | |
| void | removeSeries (int seriesIndex) |
| Remove a series. | |
| void | updateStyle (int seriesIndex, const SeriesStyle &style) |
Update a series' style. Emits styleChanged. | |
| void | updateLegendOverride (int seriesIndex, const QString &legendOverride) |
Update a series' legend override (spec-level — wins over the auto-generated "run — object (attr)" label). Empty restores the auto label. Emits styleChanged so chart rows relabel. | |
| int | seriesCount () const noexcept |
| const SeriesSpec & | spec (int i) const |
| SeriesSpec & | spec (int i) |
| const QVector< SeriesSpec > & | specs () const noexcept |
| int | addPair (ComparisonPair pair) |
Append a pair. Rejects (returns -1) invalid/duplicate pairs, self-pairs, and pairs whose series target different attributes. Emits pairsChanged on success. | |
| void | removePair (int pairIndex) |
Remove a pair by index. Emits pairsChanged. | |
| void | clearPairs () |
Drop all pairs (back to auto mode). Emits pairsChanged when the list was non-empty. | |
| const QVector< ComparisonPair > & | pairs () const noexcept |
| const QVector< AttributeRow > & | rows () const noexcept |
| Distinct attributes present in the spec list, ordered by the order each attribute was first added. | |
| void | rebuildRows () |
Force re-derivation of rows(). Called automatically after add/remove; exposed so views can refresh after a runSource yields a new periodCount during live mode. | |
| void | resolveSeries (int seriesIndex, SeriesData &out) const |
| Resolve a single series. Convenience wrapper over the RunSource layer's IRunLayer::getSeriesAt. | |
| QDateTime | animationTime () const noexcept |
| Current animation time. Invalid when nothing is playing. | |
| void | setAnimationTime (QDateTime t) |
Slot for AnimationController::currentTimeChanged. Emits animationTimeChanged for views to update the dashed cursor line. | |
Model layer for the Comparison Plot Dialog.
Lifecycle:
addRunSource.addSeries. Row layout updates and signal fires.setBaseline(runIndex).seriesAdded / seriesRemoved / styleChanged / baselineChanged / runSourceAdded / runSourceRemoved / animationTimeChanged and re-lays-out incrementally.
|
explicit |
|
overridedefault |
| int openswmmvis::plot::ComparisonPlotModel::addPair | ( | ComparisonPair | pair | ) |
Append a pair. Rejects (returns -1) invalid/duplicate pairs, self-pairs, and pairs whose series target different attributes. Emits pairsChanged on success.
| int openswmmvis::plot::ComparisonPlotModel::addRunSource | ( | RunSource | src | ) |
Append a run. Returns the new run's index.
| int openswmmvis::plot::ComparisonPlotModel::addSeries | ( | SeriesSpec | spec | ) |
Append a series spec. Auto-assigns a default style cycle if spec.style is the default-constructed style. Returns the series index.
|
inlinenoexcept |
Current animation time. Invalid when nothing is playing.
|
signal |
|
signal |
|
inlinenoexcept |
| void openswmmvis::plot::ComparisonPlotModel::clearPairs | ( | ) |
Drop all pairs (back to auto mode). Emits pairsChanged when the list was non-empty.
| int openswmmvis::plot::ComparisonPlotModel::findRunByLayer | ( | const IRunLayer * | layer | ) | const |
Find run by IRunLayer pointer; -1 if not found.
|
inlinenoexcept |
|
signal |
Phase 5 — the 1v1 pair list changed (add/remove/clear or reindex after a series removal).
| void openswmmvis::plot::ComparisonPlotModel::rebuildRows | ( | ) |
Force re-derivation of rows(). Called automatically after add/remove; exposed so views can refresh after a runSource yields a new periodCount during live mode.
| void openswmmvis::plot::ComparisonPlotModel::removePair | ( | int | pairIndex | ) |
Remove a pair by index. Emits pairsChanged.
| void openswmmvis::plot::ComparisonPlotModel::removeRunSource | ( | int | runIndex | ) |
Remove a run by index. All SeriesSpec entries referencing the removed run are dropped first; remaining specs have their runIndex shifted down where appropriate.
| void openswmmvis::plot::ComparisonPlotModel::removeSeries | ( | int | seriesIndex | ) |
Remove a series.
| void openswmmvis::plot::ComparisonPlotModel::resolveSeries | ( | int | seriesIndex, |
| SeriesData & | out | ||
| ) | const |
Resolve a single series. Convenience wrapper over the RunSource layer's IRunLayer::getSeriesAt.
|
inlinenoexcept |
Distinct attributes present in the spec list, ordered by the order each attribute was first added.
|
signal |
|
inline |
|
inline |
|
signal |
|
inlinenoexcept |
|
signal |
|
signal |
|
inlinenoexcept |
|
signal |
| void openswmmvis::plot::ComparisonPlotModel::setAnimationTime | ( | QDateTime | t | ) |
Slot for AnimationController::currentTimeChanged. Emits animationTimeChanged for views to update the dashed cursor line.
| void openswmmvis::plot::ComparisonPlotModel::setBaseline | ( | int | runIndex | ) |
Mark a run as baseline. -1 clears the baseline.
|
inline |
|
inline |
|
inlinenoexcept |
|
signal |
| void openswmmvis::plot::ComparisonPlotModel::updateLegendOverride | ( | int | seriesIndex, |
| const QString & | legendOverride | ||
| ) |
Update a series' legend override (spec-level — wins over the auto-generated "run — object (attr)" label). Empty restores the auto label. Emits styleChanged so chart rows relabel.
| void openswmmvis::plot::ComparisonPlotModel::updateStyle | ( | int | seriesIndex, |
| const SeriesStyle & | style | ||
| ) |
Update a series' style. Emits styleChanged.