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
modelspage.h
Go to the documentation of this file.
1
20#ifndef MODELSPAGE_H
21#define MODELSPAGE_H
22
23#include <functional>
24
26
27class QCheckBox;
28class QComboBox;
29class QLabel;
30class QTableWidget;
31class QTableWidgetItem;
32class QTabWidget;
33
34namespace openswmmvis::ui
35{
36
38{
39 Q_OBJECT
40
41public:
42 explicit ModelsPage(SimOptionsContext &ctx, QWidget *parent = nullptr);
43
44 [[nodiscard]] QString title() const override;
45 void read() override;
46 int write() override;
47
50
51 [[nodiscard]] QTabWidget *tabs() const { return m_tabs; }
52
53 // ---- 2D module toggle — the dialog's 2D row gate reads this ----------
54 [[nodiscard]] bool module2DEnabled() const;
55 void setModule2DEnabled(bool on);
56
59 void setFlowRoutingText(const QString &routing);
60
68 void setTransport2DHooks(std::function<bool(int)> getter,
69 std::function<void(int, bool)> setter);
70
71public slots:
75
76signals:
79
80private:
81 void buildUi();
82 void tagWidgets();
83
84 QTabWidget *m_tabs = nullptr;
85
86 QComboBox *m_infiltrationCombo = nullptr;
87 QLabel *m_routingMirror = nullptr;
88 QCheckBox *m_allowPondingBox = nullptr;
89 QCheckBox *m_ignoreRainfallBox = nullptr;
90 QCheckBox *m_ignoreSnowmeltBox = nullptr;
91 QCheckBox *m_ignoreGroundwaterBox = nullptr;
92 QCheckBox *m_ignoreRDIIBox = nullptr;
93 QCheckBox *m_ignoreQualityBox = nullptr;
94 QCheckBox *m_ignoreRoutingBox = nullptr;
95
96 QCheckBox *m_module1DBox = nullptr;
97 QCheckBox *m_module2DBox = nullptr;
98
108 bool m_module2DIntentKnown = false;
109
110 QTableWidget *m_transportMatrixTable = nullptr;
111 bool m_matrixSyncing = false;
112 std::function<bool(int)> m_transport2DGet;
113 std::function<void(int, bool)> m_transport2DSet;
114};
115
116} // namespace openswmmvis::ui
117
118#endif // MODELSPAGE_H
Definition modelspage.h:38
bool module2DEnabled() const
Definition modelspage.cpp:80
QString title() const override
Sidebar row text, already tr()'d.
Definition modelspage.cpp:75
QTabWidget * tabs() const
Definition modelspage.h:51
void setTransport2DHooks(std::function< bool(int)> getter, std::function< void(int, bool)> setter)
Where the transport matrix's 2D column reads and writes.
Definition modelspage.cpp:101
int write() override
widgets → engine via ctx_.writeIfChanged; returns the sum.
Definition modelspage.cpp:455
void setModule2DEnabled(bool on)
Definition modelspage.cpp:85
void read() override
engine → widgets. Block signals while setting.
Definition modelspage.cpp:370
Tab
Tab order, so the dialog can name tabs without magic numbers.
Definition modelspage.h:49
@ TabDomains
Definition modelspage.h:49
@ TabFlags
Definition modelspage.h:49
@ TabModules
Definition modelspage.h:49
void setFlowRoutingText(const QString &routing)
Read-only FLOW_ROUTING mirror text, pushed by the dialog from the page that owns the combo.
Definition modelspage.cpp:93
void refreshTransportMatrix()
Re-ask the engine for the matrix. Also called by the dialog when the 2D page reports a TRANSPORT_* ch...
Definition modelspage.cpp:312
void showFlowRoutingPageRequested()
The mirror's link was clicked — show Routing & Hydraulics.
Definition simoptionscontext.h:31
Definition simoptionspage.h:25
Definition openswmmvislayer.h:43
QVector< int > parent
union-find
Definition pslgminsize.cpp:176