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
meshbcrenderingprefs.h
Go to the documentation of this file.
1
26#ifndef MESHBCRENDERINGPREFS_H
27#define MESHBCRENDERINGPREFS_H
28
29#include <QColor>
30#include <QObject>
31
32class MeshBcRenderingPrefs : public QObject
33{
34 Q_OBJECT
35 Q_PROPERTY(bool colorByType READ colorByType WRITE setColorByType NOTIFY colorByTypeChanged)
36
37 Q_PROPERTY(QColor wallColor READ wallColor WRITE setWallColor NOTIFY changed)
38 Q_PROPERTY(QColor normalFlowColor READ normalFlowColor WRITE setNormalFlowColor NOTIFY changed)
39 Q_PROPERTY(QColor stageConstColor READ stageConstColor WRITE setStageConstColor NOTIFY changed)
40 Q_PROPERTY(QColor stageSeriesColor READ stageSeriesColor WRITE setStageSeriesColor NOTIFY changed)
41 Q_PROPERTY(QColor flowConstColor READ flowConstColor WRITE setFlowConstColor NOTIFY changed)
42 Q_PROPERTY(QColor flowSeriesColor READ flowSeriesColor WRITE setFlowSeriesColor NOTIFY changed)
43 Q_PROPERTY(QColor ratingCurveColor READ ratingCurveColor WRITE setRatingCurveColor NOTIFY changed)
44
48 Q_PROPERTY(double flowConstWidthPx READ flowConstWidthPx WRITE setFlowConstWidthPx NOTIFY changed)
51
52 Q_CLASSINFO("group:colorByType", "General")
53 Q_CLASSINFO("group:wallColor", "Colours")
54 Q_CLASSINFO("group:normalFlowColor", "Colours")
55 Q_CLASSINFO("group:stageConstColor", "Colours")
56 Q_CLASSINFO("group:stageSeriesColor", "Colours")
57 Q_CLASSINFO("group:flowConstColor", "Colours")
58 Q_CLASSINFO("group:flowSeriesColor", "Colours")
59 Q_CLASSINFO("group:ratingCurveColor", "Colours")
60 Q_CLASSINFO("group:normalFlowWidthPx", "Widths (px)")
61 Q_CLASSINFO("group:stageConstWidthPx", "Widths (px)")
62 Q_CLASSINFO("group:stageSeriesWidthPx", "Widths (px)")
63 Q_CLASSINFO("group:flowConstWidthPx", "Widths (px)")
64 Q_CLASSINFO("group:flowSeriesWidthPx", "Widths (px)")
65 Q_CLASSINFO("group:ratingCurveWidthPx", "Widths (px)")
66
67public:
68 explicit MeshBcRenderingPrefs(QObject *parent = nullptr);
69
70 [[nodiscard]] bool colorByType() const;
71 void setColorByType(bool on);
72
73 [[nodiscard]] QColor wallColor() const;
74 [[nodiscard]] QColor normalFlowColor() const;
75 [[nodiscard]] QColor stageConstColor() const;
76 [[nodiscard]] QColor stageSeriesColor() const;
77 [[nodiscard]] QColor flowConstColor() const;
78 [[nodiscard]] QColor flowSeriesColor() const;
79 [[nodiscard]] QColor ratingCurveColor() const;
80
81 void setWallColor(const QColor &c);
82 void setNormalFlowColor(const QColor &c);
83 void setStageConstColor(const QColor &c);
84 void setStageSeriesColor(const QColor &c);
85 void setFlowConstColor(const QColor &c);
86 void setFlowSeriesColor(const QColor &c);
87 void setRatingCurveColor(const QColor &c);
88
89 [[nodiscard]] double normalFlowWidthPx() const;
90 [[nodiscard]] double stageConstWidthPx() const;
91 [[nodiscard]] double stageSeriesWidthPx() const;
92 [[nodiscard]] double flowConstWidthPx() const;
93 [[nodiscard]] double flowSeriesWidthPx() const;
94 [[nodiscard]] double ratingCurveWidthPx() const;
95
96 void setNormalFlowWidthPx(double px);
97 void setStageConstWidthPx(double px);
98 void setStageSeriesWidthPx(double px);
99 void setFlowConstWidthPx(double px);
100 void setFlowSeriesWidthPx(double px);
101 void setRatingCurveWidthPx(double px);
102
103signals:
104 void colorByTypeChanged(bool on);
105 void changed();
106};
107
108#endif // MESHBCRENDERINGPREFS_H
Definition meshbcrenderingprefs.h:33
QColor ratingCurveColor
Definition meshbcrenderingprefs.h:43
void setStageSeriesColor(const QColor &c)
double stageSeriesWidthPx
Definition meshbcrenderingprefs.h:47
void setFlowConstColor(const QColor &c)
bool colorByType
Definition meshbcrenderingprefs.h:35
void setFlowSeriesColor(const QColor &c)
void setRatingCurveColor(const QColor &c)
void setWallColor(const QColor &c)
void colorByTypeChanged(bool on)
double flowSeriesWidthPx
Definition meshbcrenderingprefs.h:49
double stageConstWidthPx
Definition meshbcrenderingprefs.h:46
void setStageConstColor(const QColor &c)
void setStageConstWidthPx(double px)
double flowConstWidthPx
Definition meshbcrenderingprefs.h:48
QColor normalFlowColor
Definition meshbcrenderingprefs.h:38
QColor wallColor
Definition meshbcrenderingprefs.h:37
QColor flowConstColor
Definition meshbcrenderingprefs.h:41
void setStageSeriesWidthPx(double px)
QColor stageConstColor
Definition meshbcrenderingprefs.h:39
void setColorByType(bool on)
Definition meshbcrenderingprefs.cpp:31
void setFlowConstWidthPx(double px)
QColor stageSeriesColor
Definition meshbcrenderingprefs.h:40
void setNormalFlowWidthPx(double px)
QColor flowSeriesColor
Definition meshbcrenderingprefs.h:42
void setFlowSeriesWidthPx(double px)
void setRatingCurveWidthPx(double px)
double normalFlowWidthPx
Definition meshbcrenderingprefs.h:45
void setNormalFlowColor(const QColor &c)
double ratingCurveWidthPx
Definition meshbcrenderingprefs.h:50
@ General
No template.
QVector< int > parent
union-find
Definition pslgminsize.cpp:176