SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
statisticsdashboarddialog.h
Go to the documentation of this file.
1
20#ifndef OPENSWMMVIS_UI_DIALOGS_STATISTICSDASHBOARDDIALOG_H
21#define OPENSWMMVIS_UI_DIALOGS_STATISTICSDASHBOARDDIALOG_H
22
24
25#include <QDialog>
26#include <QPointer>
27#include <QSet>
28
29class QLabel;
30class QLineEdit;
31class QPoint;
32class QPushButton;
33class QSortFilterProxyModel;
34class QTabWidget;
35class QTableView;
36class QStandardItemModel;
37class QChartView;
38class MapCanvas;
39class SWMMModelLayer;
41
42namespace openswmmvis::ui {
43
44class StatisticsDashboardDialog : public QDialog
45{
46 Q_OBJECT
47public:
49 QWidget *parent = nullptr);
51
53
57 void setProject(SWMMModelLayer *layer,
58 SelectionManager *selMgr,
59 MapCanvas *canvas);
60
61private slots:
62 void onTableSelectionChanged();
63 void onSelectionManagerChanged(const QSet<SWMMObjectRef> &current,
64 const QSet<SWMMObjectRef> &added,
65 const QSet<SWMMObjectRef> &removed);
66 void onTableContextMenuRequested(const QPoint &pos);
67 void onZoomToSelected();
68 void onExportClicked();
69 void onQueryApplyClicked();
70 void onQueryClearClicked();
71 void onCurrentTabChanged(int index);
72
73private:
74 void buildUi();
76 SWMMObjectRef::ObjectType currentObjectType() const;
77 void populateNodeStats();
78 void populateLinkStats();
79 void populateSubcatchStats();
80 void rebuildHistogramFor(int column);
81 void refreshHistogramForSelection();
82 bool applyQueryToAllTables();
83 void updateQueryStatus();
84 QTableView *currentTable() const;
85 QSortFilterProxyModel *currentProxy() const;
86
87 QPointer<SWMMResultsLayer> m_layer;
88 QPointer<SWMMModelLayer> m_modelLayer;
89 QPointer<SelectionManager> m_selMgr;
90 QPointer<MapCanvas> m_canvas;
91 bool m_applyingFromBus = false;
92
93 QTabWidget *m_tabs = nullptr;
94 QLineEdit *m_queryEdit = nullptr;
95 QPushButton *m_queryApply = nullptr;
96 QPushButton *m_queryClear = nullptr;
97 QLabel *m_queryStatus = nullptr;
98 QTableView *m_nodeTable = nullptr;
99 QTableView *m_linkTable = nullptr;
100 QTableView *m_subTable = nullptr;
101 QStandardItemModel *m_nodeModel = nullptr;
102 QStandardItemModel *m_linkModel = nullptr;
103 QStandardItemModel *m_subModel = nullptr;
104 QSortFilterProxyModel *m_nodeProxy = nullptr;
105 QSortFilterProxyModel *m_linkProxy = nullptr;
106 QSortFilterProxyModel *m_subProxy = nullptr;
107 QChartView *m_histView = nullptr;
108};
109
110} // namespace openswmmvis::ui
111
112#endif // OPENSWMMVIS_UI_DIALOGS_STATISTICSDASHBOARDDIALOG_H
The central map display widget — QGIS-style hybrid rendering.
Definition mapcanvas.h:63
Renders the SWMM network elements (nodes, links, subcatchments, rain gages) for one OpenSWMMEngine mo...
Definition swmmmodellayer.h:133
Overlays time-stepped simulation results on the SWMM network geometry.
Definition swmmresultslayer.h:96
Owner of the canonical selection set for one SWMM project.
Definition selectionmanager.h:112
Definition statisticsdashboarddialog.h:45
void setProject(SWMMModelLayer *layer, SelectionManager *selMgr, MapCanvas *canvas)
Bind the dialog to the project's cross-view selection bus so table rows highlight on the map,...
Definition statisticsdashboarddialog.cpp:261
void setResultsLayer(SWMMResultsLayer *layer)
Definition statisticsdashboarddialog.cpp:108
int index
Position in m_quadRegions / m_quadReports.
Definition meshgenerator.cpp:153
Definition openswmmvislayer.h:43
QVector< int > parent
union-find
Definition pslgminsize.cpp:176
int pos
Definition queryparser.cpp:36
ObjectType
Coarse object kind. Mirrors the engine's logical groupings; finer subtypes (e.g. junction vs outfall)...
Definition selectionmanager.h:39