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
twodpage.h
Go to the documentation of this file.
1
26#ifndef TWODPAGE_H
27#define TWODPAGE_H
28
29#ifdef OPENSWMM_HAS_2D
30
31#include <functional>
32
34
35class QCheckBox;
36class QComboBox;
37class QDoubleSpinBox;
38class QGroupBox;
39class QLabel;
40class QLineEdit;
41class QListWidget;
42class QPushButton;
43class QSpinBox;
44class QTabWidget;
45class QCustomTimespanEdit;
46
47namespace openswmmvis::ui
48{
49
50class TwoDPage : public SimOptionsPage
51{
52 Q_OBJECT
53
54public:
55 explicit TwoDPage(SimOptionsContext &ctx, QWidget *parent = nullptr);
56
57 [[nodiscard]] QString title() const override;
58 void read() override;
59 int write() override;
60 void refreshGates() override;
61
63 enum Tab { TabHydrodynamics = 0, TabWetDry, TabCoupling, TabProcesses, TabOutput };
64
65 [[nodiscard]] QTabWidget *tabs() const { return m_tabs; }
66
74 struct ScheduleHooks {
75 std::function<qint64()> wetStepSeconds;
76 std::function<qint64()> reportStepSeconds;
77 std::function<qint64()> durationSeconds;
78 };
79 void setScheduleHooks(ScheduleHooks hooks);
80
82 [[nodiscard]] bool transport2DEnabled(int speciesClass) const;
83 void setTransport2DEnabled(int speciesClass, bool on);
84
85public slots:
88 void scheduleChanged();
89
90signals:
92 void transportSelectionChanged();
95 void engineEditedDirectly();
96
97private:
98 void buildUi();
99 void tagWidgets();
100 void updateOutputSizeEstimate();
101 [[nodiscard]] unsigned reportVarsMask() const;
102 void setReportVarsMask(unsigned mask);
103 [[nodiscard]] QString reportSpeciesText() const;
104 void setReportSpeciesText(const QString &text);
105
106 QTabWidget *m_tabs = nullptr;
107 ScheduleHooks m_schedule;
108
109 QDoubleSpinBox *m_maxTimestepSpin = nullptr;
110 QGroupBox *m_marcherGroup = nullptr;
111 QDoubleSpinBox *m_thetaSpin = nullptr;
112 QDoubleSpinBox *m_cflNumberSpin = nullptr;
113 QSpinBox *m_ltsTiersSpin = nullptr;
114 QDoubleSpinBox *m_hMoveSpin = nullptr;
115 QDoubleSpinBox *m_froudeMaxSpin = nullptr;
116 QComboBox *m_momentum2DCombo = nullptr;
117 QSpinBox *m_reconOrder2DSpin = nullptr;
118 QCheckBox *m_advection2DBox = nullptr;
119 QComboBox *m_backend2DCombo = nullptr;
120 QCheckBox *m_couplingAreaAutoBox = nullptr;
121 QDoubleSpinBox *m_dryDepthSpin = nullptr;
122 QDoubleSpinBox *m_limiterEpsSpin = nullptr;
123 QDoubleSpinBox *m_fluxDhEpsSpin = nullptr;
124 QComboBox *m_cellClosureCombo = nullptr;
125 QComboBox *m_faceReconCombo = nullptr;
126 QDoubleSpinBox *m_vfrMinWetFracSpin = nullptr;
127 QDoubleSpinBox *m_couplingCdSpin = nullptr;
128 QDoubleSpinBox *m_couplingSyncSpin = nullptr;
129 QComboBox *m_rainfall2DModeCombo = nullptr;
130 QCheckBox *m_report2DBox = nullptr;
131 QLineEdit *m_output2DFileEdit = nullptr;
132
133 // E1 — OUTPUT_PRECISION / OUTPUT_COMPRESSION / REPORT_2D_STEP /
134 // REPORT_2D_VARIABLES / REPORT_2D_SPECIES.
135 QComboBox *m_output2DPrecisionCombo = nullptr;
136 QSpinBox *m_output2DCompressionSpin = nullptr;
137 QCheckBox *m_report2DStepSameBox = nullptr;
138 QCustomTimespanEdit *m_report2DStepEdit = nullptr;
139 QListWidget *m_report2DVarsList = nullptr;
140 QCheckBox *m_report2DAllSpeciesBox = nullptr;
141 QListWidget *m_report2DSpeciesList = nullptr;
142 QLabel *m_output2DSizeLabel = nullptr;
143
144 // U1 — Processes group ([2D_OPTIONS] process keys, E2).
145 QComboBox *m_infil2DModeCombo = nullptr;
146 QCheckBox *m_infil2DStepSameBox = nullptr;
147 QCustomTimespanEdit *m_infil2DStepEdit = nullptr;
148 QComboBox *m_infil2DMethodCombo = nullptr;
149 QComboBox *m_infil2DDestCombo = nullptr;
150 QPushButton *m_editInfilCellsBtn = nullptr;
151 QComboBox *m_evap2DCombo = nullptr;
152 QCheckBox *m_transport2DBox[4] = {nullptr, nullptr, nullptr, nullptr};
153
154 // U5 — the Groundwater group: [2D_OPTIONS] GROUNDWATER / GW_ET, plus the
155 // Transport summary naming the [GW_*] authoring surface (U4).
156 QGroupBox *m_gw2DGroup = nullptr;
157 QComboBox *m_gw2DEnableCombo = nullptr;
158 QComboBox *m_gw2DEtCombo = nullptr;
159 QLabel *m_gw2DStatusLabel = nullptr;
160 QPushButton *m_gw2DEditBtn = nullptr;
161};
162
163} // namespace openswmmvis::ui
164
165#endif // OPENSWMM_HAS_2D
166
167#endif // TWODPAGE_H
Definition openswmmvislayer.h:43
QVector< int > parent
union-find
Definition pslgminsize.cpp:176
QString text
Definition queryparser.cpp:35
const char * title
Definition snowpackeditordialog.cpp:71