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
hydrographgroupeditor.h
Go to the documentation of this file.
1
35#ifndef HYDROGRAPHGROUPEDITOR_H
36#define HYDROGRAPHGROUPEDITOR_H
37
38#include <QDialog>
39#include <QPointer>
40#include <QString>
41
42class QListView;
43class QTableView;
44class QTabWidget;
45class QComboBox;
46class QLabel;
47class QLineEdit;
48class QSplitter;
49class QSortFilterProxyModel;
50class QToolButton;
51class QDialogButtonBox;
52class QGraphicsSimpleTextItem;
53
54class SWMMModelLayer;
59
60QT_BEGIN_NAMESPACE
61namespace QtCharts {} // forward
62QT_END_NAMESPACE
63
64class QChart;
65class QAreaSeries;
66class QLineSeries;
67class QValueAxis;
68class QLegendMarker;
69namespace openswmmvis::ui { class InteractiveChartView; class ChartAxisFormatController; }
70
71class HydrographGroupEditor : public QDialog
72{
73 Q_OBJECT
74public:
76 QWidget *parent = nullptr);
78
81 void openForGroup(const QString &name);
82
83public slots:
88 void beginNewGroup();
89
96 static QString pickGroup(SWMMModelLayer *layer,
97 const QString &initialName,
98 QWidget *parent = nullptr);
99
100protected:
101 void showEvent(QShowEvent *e) override;
102
103private slots:
104 void onGroupSelectionChanged();
105 void onSeasonChanged(int index);
106 void onGageChanged(int index);
107 void onNewGroup();
108 void onDeleteGroup();
109 void onRenameGroup();
110 void onHydrographChanged(const QString &uhName);
111 void onFilterTextChanged(const QString &text);
112 void onApplyClicked();
113 void onOkClicked();
114 void onLegendMarkerClicked();
115 void onPlotHover(const QPointF &point, bool state);
116 void showPlotStyleMenu(const QPoint &globalPos);
117
118private:
119 void buildUi();
120 QWidget *buildLeftPane();
121 QWidget *buildMiddlePane();
122 QWidget *buildRightPane();
123 void populateGageCombo();
124 void populateSeasonCombo();
125 void rebindModelsToCurrentSelection();
126 void refreshPreview();
127 void updateGroupSummary();
128 void commitOpenEditors();
129 QString currentGroupName() const;
130 int currentMonth() const;
131
132 SWMMModelLayer *m_layer = nullptr;
133
134 // Layer-owned models (do not delete here — the layer owns them).
135 HydrographGroupListModel *m_groupListModel = nullptr;
136 HydrographRtkTableModel *m_rtkModel = nullptr;
137 HydrographIaTableModel *m_iaModel = nullptr;
138 HydrographDecayTableModel *m_decayModel = nullptr;
139
140 // Filter proxy over the group list — owned by the dialog.
141 QSortFilterProxyModel *m_filterProxy = nullptr;
142
143 QSplitter *m_splitter = nullptr;
144
145 // Left pane.
146 QLineEdit *m_filterEdit = nullptr;
147 QListView *m_groupList = nullptr;
148 QToolButton *m_addBtn = nullptr;
149 QToolButton *m_removeBtn = nullptr;
150 QToolButton *m_renameBtn = nullptr;
151
152 // Middle pane.
153 QLabel *m_nameLabel = nullptr;
154 QComboBox *m_gageCombo = nullptr;
155 QComboBox *m_seasonCombo = nullptr;
156 QTabWidget *m_tabs = nullptr;
157 QTableView *m_rtkView = nullptr;
158 QTableView *m_iaView = nullptr;
159 QTableView *m_decayView = nullptr;
160 QLabel *m_summaryLabel = nullptr;
161
162 // Right pane — UH preview plot.
163 QChart *m_chart = nullptr;
164 openswmmvis::ui::InteractiveChartView *m_chartView = nullptr;
165 openswmmvis::ui::ChartAxisFormatController *m_axisFmt = nullptr;
166 QAreaSeries *m_areaSeries[3] = {nullptr, nullptr, nullptr};
167 QLineSeries *m_areaUpper[3] = {nullptr, nullptr, nullptr};
168 QLineSeries *m_sumSeries = nullptr;
169 QValueAxis *m_xAxis = nullptr;
170 QValueAxis *m_yAxis = nullptr;
171 QLabel *m_hoverLabel = nullptr;
172
173 // Action bar.
174 QDialogButtonBox *m_buttonBox = nullptr;
175
176 bool m_suppressGageSignal = false;
177 bool m_suppressSeasonSignal = false;
178};
179
180#endif // HYDROGRAPHGROUPEDITOR_H
Definition hydrographmodels.h:161
Definition hydrographgroupeditor.h:72
~HydrographGroupEditor() override
static QString pickGroup(SWMMModelLayer *layer, const QString &initialName, QWidget *parent=nullptr)
Definition hydrographgroupeditor.cpp:148
void showEvent(QShowEvent *e) override
Definition hydrographgroupeditor.cpp:129
void beginNewGroup()
Definition hydrographgroupeditor.cpp:722
void openForGroup(const QString &name)
Definition hydrographgroupeditor.cpp:134
Definition hydrographmodels.h:46
Definition hydrographmodels.h:118
Definition hydrographmodels.h:80
Renders the SWMM network elements (nodes, links, subcatchments, rain gages) for one OpenSWMMEngine mo...
Definition swmmmodellayer.h:133
Definition chartaxisformatcontroller.h:37
Definition interactivechartview.h:43
int e
Definition inpmeshreader.cpp:41
int index
Position in m_quadRegions / m_quadReports.
Definition meshgenerator.cpp:153
Definition hydrographgroupeditor.h:61
Definition openswmmvislayer.h:43
QVector< int > parent
union-find
Definition pslgminsize.cpp:176
QString text
Definition queryparser.cpp:35
QString name
Definition sectionmodelbuilders.cpp:474