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
featurestyleeditor.h
Go to the documentation of this file.
1
19#ifndef OPENSWMMVIS_UI_DIALOGS_EDITORS_FEATURESTYLEEDITOR_H
20#define OPENSWMMVIS_UI_DIALOGS_EDITORS_FEATURESTYLEEDITOR_H
21
23
24class QCheckBox;
25class QComboBox;
26class QDoubleSpinBox;
27class QFormLayout;
28class QLabel;
29class QLineEdit;
30
31namespace OpenSWMM::Render {
32 class FeatureSublayerStyle;
33 class PointFeatureSublayerStyle;
34 class LineFeatureSublayerStyle;
35 class PolygonFeatureSublayerStyle;
36}
37
38namespace openswmmvis::ui {
39
40class ColorButton;
41class LabelConfigEditor;
42class MarkerShapeCombo;
43class DashStyleCombo;
44class StylePreviewSwatch;
45
48{
49 Q_OBJECT
50public:
52 QWidget *parent = nullptr);
53
54 void refreshFromModel() override;
55
56protected:
59 void buildCommonRows();
60 void addPreviewRow();
61
64 virtual void updatePreview() = 0;
65
67
68 QComboBox *m_attributeCombo = nullptr;
70 QCheckBox *m_useRampBox = nullptr;
72
73 // L-1 — per-sublayer label controls (built in buildCommonRows()).
74 // Full-fidelity LabelConfig editor (LAYER_STYLING_LABELING_PLAN).
76
77private:
78 // Forward-declared in the global namespace to avoid pulling in
79 // <QFormLayout> from a widely-included header.
80 ::QFormLayout *m_form = nullptr;
81};
82
83// ---------------------------------------------------------------------------
84// Point archetype
85// ---------------------------------------------------------------------------
86
88{
89 Q_OBJECT
90public:
92 QWidget *parent = nullptr);
93
94 void refreshFromModel() override;
95
96protected:
97 void updatePreview() override;
98
99private:
100 OpenSWMM::Render::PointFeatureSublayerStyle *m_pointStyle = nullptr;
101 QDoubleSpinBox *m_sizeSpin = nullptr;
102 MarkerShapeCombo *m_shapeCombo = nullptr;
103};
104
105// ---------------------------------------------------------------------------
106// Line archetype
107// ---------------------------------------------------------------------------
108
110{
111 Q_OBJECT
112public:
114 QWidget *parent = nullptr);
115
116 void refreshFromModel() override;
117
118protected:
119 void updatePreview() override;
120
121private:
122 OpenSWMM::Render::LineFeatureSublayerStyle *m_lineStyle = nullptr;
123 QDoubleSpinBox *m_widthSpin = nullptr;
124 DashStyleCombo *m_dashCombo = nullptr;
125 QCheckBox *m_renderAsLineBox = nullptr;
126 QCheckBox *m_showArrowsBox = nullptr;
127 QDoubleSpinBox *m_arrowLenSpin = nullptr;
128 QDoubleSpinBox *m_arrowWidSpin = nullptr;
129 ColorButton *m_arrowColorBtn = nullptr;
130};
131
132// ---------------------------------------------------------------------------
133// Polygon archetype
134// ---------------------------------------------------------------------------
135
137{
138 Q_OBJECT
139public:
141 QWidget *parent = nullptr);
142
143 void refreshFromModel() override;
144
145protected:
146 void updatePreview() override;
147
148private:
150 ColorButton *m_outlineColorBtn = nullptr;
151 QDoubleSpinBox *m_outlineWidthSpin = nullptr;
152 QDoubleSpinBox *m_fillOpacitySpin = nullptr;
153};
154
155} // namespace openswmmvis::ui
156
157#endif // OPENSWMMVIS_UI_DIALOGS_EDITORS_FEATURESTYLEEDITOR_H
Common property bag for every per-Category result sublayer.
Definition featuresublayerstyle.h:47
Definition featuresublayerstyle.h:163
Definition featuresublayerstyle.h:112
Definition featuresublayerstyle.h:253
Definition colorbutton.h:21
Definition dashstylecombo.h:18
Definition featurestyleeditor.h:48
LabelConfigEditor * m_labelEditor
Definition featurestyleeditor.h:75
StylePreviewSwatch * m_preview
Definition featurestyleeditor.h:71
QComboBox * m_attributeCombo
Definition featurestyleeditor.h:68
OpenSWMM::Render::FeatureSublayerStyle * m_style
Definition featurestyleeditor.h:66
void addPreviewRow()
Definition featurestyleeditor.cpp:144
void refreshFromModel() override
Definition featurestyleeditor.cpp:163
ColorButton * m_singleColorBtn
Definition featurestyleeditor.h:69
void buildCommonRows()
Definition featurestyleeditor.cpp:88
QCheckBox * m_useRampBox
Definition featurestyleeditor.h:70
Custom editor widget for one style subject.
Definition istyleeditorwidget.h:44
Definition labelconfigeditor.h:41
Definition featurestyleeditor.h:110
void refreshFromModel() override
Definition featurestyleeditor.cpp:316
void updatePreview() override
Definition featurestyleeditor.cpp:333
Definition markershapecombo.h:21
Definition featurestyleeditor.h:88
void updatePreview() override
Definition featurestyleeditor.cpp:233
void refreshFromModel() override
Definition featurestyleeditor.cpp:223
Definition featurestyleeditor.h:137
void updatePreview() override
Definition featurestyleeditor.cpp:399
void refreshFromModel() override
Definition featurestyleeditor.cpp:387
Definition stylepreviewswatch.h:24
MVC-style editor widget for a single styleable subject.
Definition gisrasterlayer.h:40
Definition openswmmvislayer.h:43
QVector< int > parent
union-find
Definition pslgminsize.cpp:176