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
rastersymbologypanel.h
Go to the documentation of this file.
1
33#ifndef OPENSWMMVIS_UI_DIALOGS_RASTERSYMBOLOGYPANEL_H
34#define OPENSWMMVIS_UI_DIALOGS_RASTERSYMBOLOGYPANEL_H
35
36#include <QPointer>
37#include <QWidget>
38
39class GISRasterLayer;
40class QCheckBox;
41class QComboBox;
42class QDoubleSpinBox;
43class QGroupBox;
44class QLabel;
45class QPushButton;
46class QSpinBox;
47class QStackedWidget;
48class QStandardItemModel;
49class QTableView;
50
51namespace OpenSWMM::Render {
52class GraduatedRasterRenderer;
53class MultiBandColorRenderer;
54class PalettedRasterRenderer;
55}
56
57namespace openswmmvis::ui {
58
59class ClassificationEditor;
60
61class RasterSymbologyPanel : public QWidget
62{
63 Q_OBJECT
64public:
67 enum class Kind : int { Graduated = 0, Paletted = 1, MultiBand = 2 };
68
69 explicit RasterSymbologyPanel(GISRasterLayer *layer, QWidget *parent = nullptr);
70
72 [[nodiscard]] Kind currentKind() const;
73
74public slots:
76 void refreshFromModel();
77
78private:
79 [[nodiscard]] QGroupBox *buildSourceGroup();
80 [[nodiscard]] QWidget *buildGraduatedPage();
81 [[nodiscard]] QWidget *buildPalettedPage();
82 [[nodiscard]] QWidget *buildMultiBandPage();
83 [[nodiscard]] QGroupBox *buildHillshadeGroup();
84
85 void onKindComboChanged(int index);
87 void installKind(Kind kind);
88
89 void rebuildPalettedTable();
90 void pushPalettedTable();
91 void pushMultiBand();
92 void pushHillshade();
93
94 [[nodiscard]] OpenSWMM::Render::GraduatedRasterRenderer *graduated() const;
95 [[nodiscard]] OpenSWMM::Render::PalettedRasterRenderer *paletted() const;
96 [[nodiscard]] OpenSWMM::Render::MultiBandColorRenderer *multiband() const;
97
98 QPointer<GISRasterLayer> m_layer;
99
100 QComboBox *m_kindCombo = nullptr;
101 QStackedWidget *m_stack = nullptr;
102
103 QGroupBox *m_sourceBox = nullptr;
104 QSpinBox *m_bandSpin = nullptr;
105 QLabel *m_nodataLabel = nullptr;
106
107 ClassificationEditor *m_classEditor = nullptr;
108 QCheckBox *m_clipCheck = nullptr;
109
110 QComboBox *m_paletteCombo = nullptr;
111 QTableView *m_palTable = nullptr;
112 QStandardItemModel *m_palModel = nullptr;
113 QPushButton *m_classifyBtn = nullptr;
114 QPushButton *m_loadTableBtn = nullptr;
115
116 QSpinBox *m_redSpin = nullptr;
117 QSpinBox *m_greenSpin = nullptr;
118 QSpinBox *m_blueSpin = nullptr;
119 QSpinBox *m_alphaSpin = nullptr;
120
121 QGroupBox *m_hsBox = nullptr;
122 QCheckBox *m_hsEnable = nullptr;
123 QDoubleSpinBox *m_hsAzimuth = nullptr;
124 QDoubleSpinBox *m_hsAltitude = nullptr;
125 QDoubleSpinBox *m_hsZFactor = nullptr;
126 QDoubleSpinBox *m_hsStrength = nullptr;
127
128 bool m_suppress = false; // true while the panel itself writes controls
129};
130
131} // namespace openswmmvis::ui
132
133#endif // OPENSWMMVIS_UI_DIALOGS_RASTERSYMBOLOGYPANEL_H
A map layer backed by a GDAL raster dataset.
Definition gisrasterlayer.h:61
ClassificationScheme-driven single-band raster colouring.
Definition graduatedrasterrenderer.h:59
RGB(A) composite from three (or four) raster bands.
Definition multibandcolorrenderer.h:33
Discrete value → colour raster renderer (categorical rasters).
Definition palettedrasterrenderer.h:36
Definition classificationeditor.h:59
Definition rastersymbologypanel.h:62
void refreshFromModel()
Definition rastersymbologypanel.cpp:452
Kind
Definition rastersymbologypanel.h:67
Kind currentKind() const
Definition rastersymbologypanel.cpp:343
int index
Position in m_quadRegions / m_quadReports.
Definition meshgenerator.cpp:153
Definition gisrasterlayer.h:40
Definition openswmmvislayer.h:43
QVector< int > parent
union-find
Definition pslgminsize.cpp:176
TokenKind kind
Definition queryparser.cpp:34