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
meshpage.h
Go to the documentation of this file.
1
15#ifndef MESHPAGE_H
16#define MESHPAGE_H
17
18#include <functional>
19
21
22class QLabel;
23class QListWidget;
24
25namespace openswmmvis::ui
26{
27
29{
30 Q_OBJECT
31
32public:
33 explicit MeshPage(SimOptionsContext &ctx, QWidget *parent = nullptr);
34
35 [[nodiscard]] QString title() const override;
36 void read() override;
37 int write() override;
38
47 void set2DModuleSetter(std::function<void(bool)> setter);
48
49private slots:
50 void refreshMeshList();
51 void onMeshSetActive();
52 void onMeshRemove();
53 void onMeshImport();
54
55private:
56 void buildUi();
57
58 QListWidget *m_meshList = nullptr;
59 QLabel *m_meshDirLabel = nullptr;
60 QLabel *m_meshActiveLabel = nullptr;
61 std::function<void(bool)> m_set2DModuleEnabled;
62};
63
64} // namespace openswmmvis::ui
65
66#endif // MESHPAGE_H
Definition meshpage.h:29
void read() override
engine → widgets. Block signals while setting.
Definition meshpage.cpp:57
int write() override
widgets → engine via ctx_.writeIfChanged; returns the sum.
Definition meshpage.cpp:62
QString title() const override
Sidebar row text, already tr()'d.
Definition meshpage.cpp:47
void set2DModuleSetter(std::function< void(bool)> setter)
How this page turns the 2D module on or off.
Definition meshpage.cpp:52
Definition simoptionscontext.h:31
Definition simoptionspage.h:25
Definition openswmmvislayer.h:43
QVector< int > parent
union-find
Definition pslgminsize.cpp:176