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
nodecompoundeditdialog.h
Go to the documentation of this file.
1
19#ifndef NODECOMPOUNDEDITDIALOG_H
20#define NODECOMPOUNDEDITDIALOG_H
21
22#include <QDialog>
23
25
26class QStackedWidget;
27class QTableWidget;
28class QLabel;
29class QLineEdit;
30class QComboBox;
31class QDoubleSpinBox;
32class QDialogButtonBox;
33class QPushButton;
35
36class NodeCompoundEditDialog : public QDialog
37{
38 Q_OBJECT
39
40public:
42 QWidget *parent = nullptr);
43
48 [[nodiscard]] QString updatedSummary() const { return m_ref.summary; }
49
50private:
51 void buildInflowsPage();
52 void buildDwfPage();
53 void buildRdiiPage();
54 void buildTreatmentPage();
55
58 void refreshActivePage();
59
62 [[nodiscard]] int nodeIdx() const;
63
64 // DB.4 — combo population helpers. Each clears + repopulates the
65 // picker with the engine's current set of data objects.
66 void populateConstituentCombo(QComboBox *c);
67 void populateTimeSeriesCombo(LabeledPickerCombo *p);
68 void populatePatternCombo(LabeledPickerCombo *p);
69 void populateUhGroupCombo(LabeledPickerCombo *p);
70
78 QString launchObjectEditor(int dataCategory, const QString &currentName);
79
84 void wirePicker(LabeledPickerCombo *picker, int dataCategory,
85 void (NodeCompoundEditDialog::*repopulate)(LabeledPickerCombo*));
86
90 void updateInflowsMassEnabled();
91
93
94 // RDII page — `swmm_rdii_*`.
95 QTableWidget *m_rdiiTable = nullptr;
96 QPushButton *m_rdiiRemoveBtn = nullptr;
97 LabeledPickerCombo *m_rdiiUhPicker = nullptr; // DB.4f — combo + "..." button
98 QDoubleSpinBox *m_rdiiAreaSpin = nullptr;
99 QLabel *m_rdiiSummary = nullptr;
100
101 // Inflows page — `swmm_ext_inflow_*`.
102 QLabel *m_inflowsSummary = nullptr;
103 QTableWidget *m_inflowsTable = nullptr;
104 QPushButton *m_inflowsRemoveBtn = nullptr;
105 QComboBox *m_inflowsConstCombo = nullptr; // DB.4d — FLOW + pollutants
106 QComboBox *m_inflowsTypeCombo = nullptr; // MASS disabled when FLOW
107 LabeledPickerCombo *m_inflowsTsPicker = nullptr; // time series + "..."
108 QDoubleSpinBox *m_inflowsBaseSpin = nullptr;
109 QDoubleSpinBox *m_inflowsMFactSpin = nullptr;
110 QDoubleSpinBox *m_inflowsSFactSpin = nullptr;
111 LabeledPickerCombo *m_inflowsPatPicker = nullptr; // pattern + "..."
112
113 // DWF page — `swmm_dwf_*`.
114 QLabel *m_dwfSummary = nullptr;
115 QTableWidget *m_dwfTable = nullptr;
116 QPushButton *m_dwfRemoveBtn = nullptr;
117 QComboBox *m_dwfConstCombo = nullptr; // DB.4e
118 QDoubleSpinBox *m_dwfAvgSpin = nullptr;
119 LabeledPickerCombo *m_dwfPat1Picker = nullptr; // Monthly + "..."
120 LabeledPickerCombo *m_dwfPat2Picker = nullptr; // Daily + "..."
121 LabeledPickerCombo *m_dwfPat3Picker = nullptr; // Hourly + "..."
122 LabeledPickerCombo *m_dwfPat4Picker = nullptr; // Weekend + "..."
123
124 // Treatment — per-(node, pollutant) removal expression, edited
125 // inline in a 2-col table (Pollutant | Expression). Writes route
126 // through `swmm_treatment_set` / `swmm_treatment_clear` as the
127 // user commits the Expression cell.
128 QLabel *m_treatmentSummary = nullptr;
129 QTableWidget *m_treatmentTable = nullptr;
130 QLabel *m_treatmentBanner = nullptr; // live validator verdict
131 // Re-entrancy guard: applying engine state to the table fires
132 // QTableWidget::itemChanged for every cell, which would otherwise
133 // bounce right back into the commit handler. Set to true while
134 // populating; the cell-changed slot bails when set.
135 bool m_treatmentSuppressCommit = false;
136
137 QStackedWidget *m_stack = nullptr;
138 QDialogButtonBox *m_buttons = nullptr;
139};
140
141#endif // NODECOMPOUNDEDITDIALOG_H
Definition labeledcontrols.h:146
Definition nodecompoundeditdialog.h:37
QString updatedSummary() const
Definition nodecompoundeditdialog.h:48
ArrowPlacement p
Definition linesymbollayer.cpp:27
EdgeRef ref
Definition pslgminsize.cpp:377
QVector< int > parent
union-find
Definition pslgminsize.cpp:176
Definition nodecompoundeditref.h:32
QString summary
Short text shown in the cell.
Definition nodecompoundeditref.h:51