20#ifndef OPENSWMMVIS_UI_DIALOGS_COMPARISONPLOTDIALOG_H
21#define OPENSWMMVIS_UI_DIALOGS_COMPARISONPLOTDIALOG_H
60class InteractiveChartView;
61class RangeSliderWidget;
62class StatsSummaryPanel;
79 bool makeBaseline =
false);
101 const QVector<int>& triIdxList,
102 const QVector<openswmmvis::plot::PlotAttribute>& attributes);
116 void onRunSourceAdded(
int runIndex);
117 void onRunSourceRemoved(
int runIndex);
118 void onSeriesAdded(
int seriesIndex);
119 void onSeriesRemoved(
int seriesIndex);
120 void onStyleChanged(
int seriesIndex);
121 void onRowsChanged();
122 void onAnimationTimeChanged(QDateTime
t);
128 void appendChartTails();
130 void onAddSeriesClicked();
131 void onLoadObservedClicked();
132 void onRemoveSelectedClicked();
133 void onSeriesItemSelectionChanged();
134 void onSeriesItemDoubleClicked(QTreeWidgetItem *item,
int column);
137 void onSeriesItemChanged(QTreeWidgetItem *item,
int column);
138 void onSeriesTreeContextMenu(
const QPoint &
pos);
141 void onModeActionTriggered();
143 void onExportPngClicked();
144 void onExportDataClicked();
145 void onAnimationCursorToggled(
bool checked);
146 void onAddSystemSeriesClicked();
150 void onShowSeriesToggled(
bool show);
151 void onShowStatsToggled(
bool show);
152 void onShowSliderToggled(
bool show);
153 void onChartsOnlyToggled(
bool chartsOnly);
156 void onShow1v1Toggled(
bool show);
159 void onConfigure1v1Clicked();
164 void rebuildSeriesTree();
165 void rebuildCharts();
169 void updateChartForRow(
int rowIndex);
170 void applyAnimationCursorToCharts();
173 void propagateModeToRows();
175 void equaliseChartSplitterSizes();
177 void wireXAxisSync(
int rowIndex);
181 void exportSeriesData(
const QVector<int>& seriesIndices);
183 std::unique_ptr<openswmmvis::plot::ComparisonPlotModel> m_model;
186 QSplitter *m_splitter =
nullptr;
187 QTreeWidget *m_seriesTree =
nullptr;
188 QPushButton *m_addBtn =
nullptr;
189 QPushButton *m_loadObsBtn =
nullptr;
190 QPushButton *m_removeBtn =
nullptr;
191 QScrollArea *m_chartsScroll =
nullptr;
192 QSplitter *m_chartsSplitter =
nullptr;
193 QSplitter *m_chartsOuter =
nullptr;
195 QLabel *m_rangeLabel =
nullptr;
196 QWidget *m_sliderHost =
nullptr;
197 QWidget *m_leftHost =
nullptr;
201 QToolBar *m_toolBar =
nullptr;
202 QActionGroup *m_modeActions =
nullptr;
203 QAction *m_actSelect =
nullptr;
204 QAction *m_actPan =
nullptr;
205 QAction *m_actZoomIn =
nullptr;
206 QAction *m_actZoomOut =
nullptr;
207 QAction *m_actFit =
nullptr;
208 QAction *m_actExport =
nullptr;
209 QAction *m_actExportData =
nullptr;
210 QAction *m_actAnimCursor =
nullptr;
211 QAction *m_actAddSystem =
nullptr;
212 QAction *m_actAddFromMap =
nullptr;
217 QAction *m_actShowSeries =
nullptr;
218 QAction *m_actShowStats =
nullptr;
219 QAction *m_actShowSlider =
nullptr;
220 QAction *m_actChartsOnly =
nullptr;
221 QAction *m_actShow1v1 =
nullptr;
222 QAction *m_actConfig1v1 =
nullptr;
225 QList<int> m_savedSplitterSizes;
226 QList<int> m_savedChartsOuterSizes;
231 QWidget *rowFrame =
nullptr;
235 QChart *chart =
nullptr;
237 QValueAxis *yAxis =
nullptr;
238 QLineSeries *cursorLine =
nullptr;
239 QVector<QLineSeries*> series;
240 QVector<int> consumed;
246 QChart *scatterChart =
nullptr;
247 QValueAxis *scatterXAxis =
nullptr;
248 QValueAxis *scatterYAxis =
nullptr;
249 QLineSeries *identityLine =
nullptr;
250 QVector<QScatterSeries*> scatterSeries;
252 QVector<RowWidgets> m_rowWidgets;
254 QDateTime m_curAnimTime;
255 bool m_syncingX =
false;
256 bool m_showCursor =
true;
260 QDateTime m_xFullMin;
261 QDateTime m_xFullMax;
262 bool m_syncingSlider =
false;
Definition swmm2dresultslayer.h:550
Overlays time-stepped simulation results on the SWMM network geometry.
Definition swmmresultslayer.h:96
Model layer for the Comparison Plot Dialog.
Definition comparisonplotmodel.h:118
Definition utctimeaxis.h:57
Definition comparisonplotdialog.h:65
void addFromMapToggled(bool active)
Slice AT.2 — emitted when the user toggles the "Add from Map…" toolbar action. The dialog itself does...
~ComparisonPlotDialog() override
void setAddFromMapChecked(bool checked)
Slice AT.2 — programmatically set the Add-from-Map toolbar action's checked state....
Definition comparisonplotdialog.cpp:422
int addSeries(int runIndex, const openswmmvis::plot::ObjectRef &ref, openswmmvis::plot::PlotAttribute attr)
Convenience helper: add a series in one call. Returns the new series index, or -1 on failure.
Definition comparisonplotdialog.cpp:793
int ensureRunSourceForLayer(::SWMMResultsLayer *layer, bool makeBaseline=false)
Convenience helper: add a 1D RunSource for the given results layer (or update the existing one if alr...
Definition comparisonplotdialog.cpp:765
openswmmvis::plot::ComparisonPlotModel * model() noexcept
Underlying model — exposed so callers (Object Browser wiring, CF.3's openComparisonPlotForCells) can ...
Definition comparisonplotdialog.h:73
int addCellSeries(int runIndex, const QVector< int > &triIdxList, const QVector< openswmmvis::plot::PlotAttribute > &attributes)
CF.3 — add per-cell series for the supplied attribute list. Returns the count of series successfully ...
Definition comparisonplotdialog.cpp:838
int ensureRunSourceForMeshLayer(::SWMM2DResultsLayer *layer)
CF.3 — add a 2D RunSource for the given mesh results layer (or return the existing one) and return it...
Definition comparisonplotdialog.cpp:817
Definition interactivechartview.h:43
Definition statssummarypanel.h:42
Slice BL — model layer for the Comparison Plot Dialog.
DiagramType t
Definition diagramspec.cpp:20
Definition chartproperties.h:34
PlotAttribute
What a series plots. One row per attribute in the Nx2 grid.
Definition plotattribute.h:38
Definition openswmmvislayer.h:43
EdgeRef ref
Definition pslgminsize.cpp:377
QVector< int > parent
union-find
Definition pslgminsize.cpp:176
int pos
Definition queryparser.cpp:36
Identifies what object a series is about. Kind is the discriminator; the active union member is impli...
Definition irunlayer.h:38
One plottable result: a fixed attribute OR a species by name.
Definition resultdescriptor.h:39
One chart series — points at a RunSource via index and identifies what to read from it.
Definition comparisonplotmodel.h:51