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
newfeaturelayerdialog.h
Go to the documentation of this file.
1
19#ifndef NEWFEATURELAYERDIALOG_H
20#define NEWFEATURELAYERDIALOG_H
21
24#include "layers/featurelayer.h"
25
26#include <QDialog>
27#include <QString>
28
29class QCheckBox;
30class QComboBox;
31class QDialogButtonBox;
32class QDoubleSpinBox;
33class QLabel;
34class QLineEdit;
35class QPushButton;
36class QSpinBox;
37class QTableWidget;
38class MapCanvas;
39
40namespace openswmmvis::ui {
41
42class NewFeatureLayerDialog : public QDialog
43{
44 Q_OBJECT
45
46public:
51 explicit NewFeatureLayerDialog(MapCanvas *canvas, QWidget *parent = nullptr);
52
53 [[nodiscard]] QString layerName() const;
55 [[nodiscard]] openswmmvis::feature::Schema schema() const;
56 [[nodiscard]] ZPolicy zPolicy() const;
57 [[nodiscard]] FeatureLayerRole role() const;
59 [[nodiscard]] QString srsWkt() const;
60
61private slots:
62 void onRoleChanged(int index);
63 void onZSourceChanged(int index);
64 void onAddField();
65 void onRemoveField();
66 void validateAndAccept();
67
68private:
69 void buildUi();
70 void populateZSources();
72 void applyRoleTemplate(FeatureLayerRole r);
73 [[nodiscard]] openswmmvis::feature::Schema readSchemaTable() const;
74 void writeSchemaTable(const openswmmvis::feature::Schema &s);
75
76 MapCanvas *m_canvas = nullptr;
77
78 QLineEdit *m_nameEdit = nullptr;
79 QComboBox *m_roleCombo = nullptr;
80 QComboBox *m_geomCombo = nullptr;
81 QLabel *m_crsLabel = nullptr;
82
83 QComboBox *m_zSourceCombo = nullptr;
84 QComboBox *m_zLayerCombo = nullptr;
85 QSpinBox *m_zBandSpin = nullptr;
86 QDoubleSpinBox *m_zConstantSpin = nullptr;
87 QDoubleSpinBox *m_zScaleSpin = nullptr;
88 QDoubleSpinBox *m_zDensifySpin = nullptr;
89 QCheckBox *m_zResampleBox = nullptr;
90 QLabel *m_zHint = nullptr;
91
92 QTableWidget *m_fieldTable = nullptr;
93 QPushButton *m_addFieldBtn = nullptr;
94 QPushButton *m_removeFieldBtn = nullptr;
95
96 QDialogButtonBox *m_buttons = nullptr;
97};
98
99} // namespace openswmmvis::ui
100
101#endif // NEWFEATURELAYERDIALOG_H
The central map display widget — QGIS-style hybrid rendering.
Definition mapcanvas.h:63
An ordered list of FieldDef, with name lookup.
Definition featuretypes.h:104
Definition newfeaturelayerdialog.h:43
QString layerName() const
Definition newfeaturelayerdialog.cpp:367
FeatureLayerRole role() const
Definition newfeaturelayerdialog.cpp:383
openswmmvis::feature::GeometryType geometryType() const
Definition newfeaturelayerdialog.cpp:373
openswmmvis::feature::Schema schema() const
Definition newfeaturelayerdialog.cpp:378
ZPolicy zPolicy() const
Definition newfeaturelayerdialog.cpp:388
QString srsWkt() const
WKT of the canvas CRS, or empty when the canvas has none.
Definition newfeaturelayerdialog.cpp:401
FeatureLayerRole
What a feature layer is FOR.
Definition featurelayer.h:67
double s
Scene px per model length unit.
Definition inletdrawingview.cpp:82
int index
Position in m_quadRegions / m_quadReports.
Definition meshgenerator.cpp:153
GeometryType
Geometry kinds an editable feature layer can hold.
Definition featuregeometry.h:52
Definition openswmmvislayer.h:43
QVector< int > parent
union-find
Definition pslgminsize.cpp:176
How a layer's vertex Z values are obtained (PLAN §4.1).
Definition featurelayer.h:97