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
simoptionspage.h
Go to the documentation of this file.
1
13#ifndef SIMOPTIONSPAGE_H
14#define SIMOPTIONSPAGE_H
15
16#include <QString>
17#include <QWidget>
18
20
21namespace openswmmvis::ui
22{
23
24class SimOptionsPage : public QWidget
25{
26 Q_OBJECT
27
28public:
29 explicit SimOptionsPage(SimOptionsContext &ctx, QWidget *parent = nullptr);
30
32 [[nodiscard]] virtual QString title() const = 0;
33
35 virtual void read() = 0;
36
38 virtual int write() = 0;
39
41 virtual void refreshGates() {}
42
44 virtual void applyCapabilities() {}
45
47 virtual bool validate(QString *warn) { Q_UNUSED(warn); return true; }
48
49signals:
52
53protected:
65 static void tagOption(QWidget *w, const char *key);
66
68};
69
79const char *transport2DKey(int speciesClass);
80
81} // namespace openswmmvis::ui
82
83#endif // SIMOPTIONSPAGE_H
Definition simoptionscontext.h:31
Definition simoptionspage.h:25
virtual QString title() const =0
Sidebar row text, already tr()'d.
virtual void refreshGates()
Intra-page widget gates (PLAN §4.3 "widget" rows).
Definition simoptionspage.h:41
virtual int write()=0
widgets → engine via ctx_.writeIfChanged; returns the sum.
SimOptionsContext & ctx_
Definition simoptionspage.h:67
void gateInputsChanged()
Emit from any control that feeds a PageGate.
virtual void applyCapabilities()
One-shot per-widget disable/tooltip from ctx_.caps().
Definition simoptionspage.h:44
virtual void read()=0
engine → widgets. Block signals while setting.
static void tagOption(QWidget *w, const char *key)
Tag an option widget for the reachability test.
Definition simoptionspage.cpp:17
virtual bool validate(QString *warn)
Validation run before Apply/OK; false pops warn and stops.
Definition simoptionspage.h:47
int w
Definition mesh2dresultsexport.cpp:387
const char * key
Definition meshcellparams.cpp:24
Definition openswmmvislayer.h:43
const char * transport2DKey(int speciesClass)
The [2D_OPTIONS] key carrying one SWMM_TRANSPORT_CLASS_*, or "" for an unknown class.
Definition simoptionspage.cpp:34
QVector< int > parent
union-find
Definition pslgminsize.cpp:176