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
transectpropertybag.h
Go to the documentation of this file.
1
24#ifndef OPENSWMMVIS_UI_DIALOGS_TRANSECTPROPERTYBAG_H
25#define OPENSWMMVIS_UI_DIALOGS_TRANSECTPROPERTYBAG_H
26
27#include <QObject>
28#include <QPointer>
29#include <QString>
30
31class SWMMModelLayer;
32
33namespace openswmmvis::transect { class TransectProvider; }
34
35namespace openswmmvis::ui {
36
37class TransectPropertyBag : public QObject
38{
39 Q_OBJECT
40
41 Q_PROPERTY(double nLeftBank READ nLeftBank WRITE setNLeftBank NOTIFY nLeftBankChanged)
42 Q_PROPERTY(double nRightBank READ nRightBank WRITE setNRightBank NOTIFY nRightBankChanged)
43 Q_PROPERTY(double nChannel READ nChannel WRITE setNChannel NOTIFY nChannelChanged)
44
45 Q_PROPERTY(double xLeftBank READ xLeftBank WRITE setXLeftBank NOTIFY xLeftBankChanged)
46 Q_PROPERTY(double xRightBank READ xRightBank WRITE setXRightBank NOTIFY xRightBankChanged)
47
50
54
55public:
56 explicit TransectPropertyBag(QObject *parent = nullptr);
57
58 void bind(openswmmvis::transect::TransectProvider *p,
59 SWMMModelLayer *layer = nullptr);
60 openswmmvis::transect::TransectProvider *provider() const noexcept;
61
62 Q_INVOKABLE QString displayLabelFor(const QString &property) const;
63
64 double nLeftBank() const noexcept { return m_nLeft; }
65 double nRightBank() const noexcept { return m_nRight; }
66 double nChannel() const noexcept { return m_nChannel; }
67 double xLeftBank() const noexcept { return m_xLeftBank; }
68 double xRightBank() const noexcept { return m_xRightBank; }
69 double xLeftEncroachment() const noexcept { return m_xLeftEnc; }
70 double xRightEncroachment() const noexcept { return m_xRightEnc; }
71 double stationMultiplier() const noexcept { return m_xFactor; }
72 double elevationOffset() const noexcept { return m_yFactor; }
73 double meanderFactor() const noexcept { return m_lengthFactor; }
74
75public slots:
76 void setNLeftBank(double v);
77 void setNRightBank(double v);
78 void setNChannel(double v);
79 void setXLeftBank(double v);
80 void setXRightBank(double v);
81 void setXLeftEncroachment(double v);
82 void setXRightEncroachment(double v);
83 void setStationMultiplier(double v);
84 void setElevationOffset(double v);
85 void setMeanderFactor(double v);
86
87signals:
88 void nLeftBankChanged(double);
89 void nRightBankChanged(double);
90 void nChannelChanged(double);
91 void xLeftBankChanged(double);
92 void xRightBankChanged(double);
98
99private slots:
100 void onProviderRoughnessChanged_();
101 void onProviderBankStationsChanged_();
102 void onProviderEncroachmentChanged_();
103 void onProviderModifiersChanged_();
104
105private:
106 void refreshFromProvider_();
107 void pushRoughness_();
108 void pushBank_();
109 void pushEncroach_();
110 void pushModifiers_();
111
112 QPointer<openswmmvis::transect::TransectProvider> m_provider;
113 QPointer<SWMMModelLayer> m_layer;
114
115 double m_nLeft = 0.0;
116 double m_nRight = 0.0;
117 double m_nChannel = 0.0;
118 double m_xLeftBank = 0.0;
119 double m_xRightBank = 0.0;
120 double m_xLeftEnc = 0.0;
121 double m_xRightEnc = 0.0;
122 double m_xFactor = 1.0;
123 double m_yFactor = 0.0;
124 double m_lengthFactor = 1.0;
125
126 bool m_suppressPush = false;
127};
128
129} // namespace openswmmvis::ui
130
131#endif // OPENSWMMVIS_UI_DIALOGS_TRANSECTPROPERTYBAG_H
Renders the SWMM network elements (nodes, links, subcatchments, rain gages) for one OpenSWMMEngine mo...
Definition swmmmodellayer.h:133
Definition transectprovider.h:42
Definition transectpropertybag.h:38
double elevationOffset() const noexcept
Definition transectpropertybag.h:72
double xRightBank
Definition transectpropertybag.h:46
void setElevationOffset(double v)
Definition transectpropertybag.cpp:155
double nLeftBank
Definition transectpropertybag.h:41
void setXRightBank(double v)
Definition transectpropertybag.cpp:123
void setNRightBank(double v)
Definition transectpropertybag.cpp:99
void setXLeftBank(double v)
Definition transectpropertybag.cpp:115
double stationMultiplier() const noexcept
Definition transectpropertybag.h:71
double xRightEncroachment
Definition transectpropertybag.h:49
void setNLeftBank(double v)
Definition transectpropertybag.cpp:91
void setMeanderFactor(double v)
Definition transectpropertybag.cpp:163
double xRightEncroachment() const noexcept
Definition transectpropertybag.h:70
double nRightBank() const noexcept
Definition transectpropertybag.h:65
void bind(openswmmvis::transect::TransectProvider *p, SWMMModelLayer *layer=nullptr)
Definition transectpropertybag.cpp:21
double meanderFactor
Definition transectpropertybag.h:53
void setStationMultiplier(double v)
Definition transectpropertybag.cpp:147
double xRightBank() const noexcept
Definition transectpropertybag.h:68
Q_INVOKABLE QString displayLabelFor(const QString &property) const
Definition transectpropertybag.cpp:74
openswmmvis::transect::TransectProvider * provider() const noexcept
Definition transectpropertybag.cpp:39
double nChannel
Definition transectpropertybag.h:43
double xLeftEncroachment() const noexcept
Definition transectpropertybag.h:69
void setXLeftEncroachment(double v)
Definition transectpropertybag.cpp:131
double xLeftBank
Definition transectpropertybag.h:45
double stationMultiplier
Definition transectpropertybag.h:51
void setXRightEncroachment(double v)
Definition transectpropertybag.cpp:139
double nRightBank
Definition transectpropertybag.h:42
double meanderFactor() const noexcept
Definition transectpropertybag.h:73
double nChannel() const noexcept
Definition transectpropertybag.h:66
void setNChannel(double v)
Definition transectpropertybag.cpp:107
double xLeftBank() const noexcept
Definition transectpropertybag.h:67
double xLeftEncroachment
Definition transectpropertybag.h:48
double elevationOffset
Definition transectpropertybag.h:52
ArrowPlacement p
Definition linesymbollayer.cpp:27
Definition transectprovider.h:33
Definition openswmmvislayer.h:43
Definition aquiferprovider.h:21
QVector< int > v
pool vertex indices
Definition pslgminsize.cpp:159
QVector< int > parent
union-find
Definition pslgminsize.cpp:176