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
infilassigntoselectiondialog.h
Go to the documentation of this file.
1
40#ifndef OPENSWMMVIS_UI_DIALOGS_INFILASSIGNTOSELECTIONDIALOG_H
41#define OPENSWMMVIS_UI_DIALOGS_INFILASSIGNTOSELECTIONDIALOG_H
42
43#include "mesh/meshinfil.h"
44
45#include <QDialog>
46#include <QPointer>
47#include <QString>
48#include <QVector>
49
50class MapCanvas;
52class SWMM2DMeshLayer;
53
54class QComboBox;
55class QDoubleSpinBox;
56class QLabel;
57class QPushButton;
58class QRadioButton;
59
60namespace openswmmvis::ui {
61
62class InfilAssignToSelectionDialog : public QDialog
63{
64 Q_OBJECT
65
66public:
72 static void showFor(SWMM2DMeshLayer *meshLayer,
73 MapCanvas *canvas,
74 SelectionManager *selection,
75 const QString &depthUnitLabel,
76 QWidget *parent);
77
79 MapCanvas *canvas,
80 SelectionManager *selection,
81 const QString &depthUnitLabel,
82 QWidget *parent = nullptr);
83
85 void rebind(SWMM2DMeshLayer *meshLayer,
86 MapCanvas *canvas,
87 SelectionManager *selection,
88 const QString &depthUnitLabel);
89
90private slots:
91 void onMethodChanged();
92 void onApply();
93 void onSelectionChanged();
94
95private:
96 void buildUi();
97
103 [[nodiscard]] QVector<int> selectedCells() const;
104
107 [[nodiscard]] QString commonTag() const;
108
111 [[nodiscard]] mesh::InfilRow currentRow() const;
112
113 [[nodiscard]] mesh::InfilMethod currentMethod() const;
114
117 void refreshParamFields();
118
121 void refreshSelectionState();
122
123 QPointer<SWMM2DMeshLayer> m_mesh;
124 QPointer<MapCanvas> m_canvas;
125 QPointer<SelectionManager> m_selection;
126 QString m_depthUnitLabel;
127
128 QLabel *m_selectionLbl = nullptr;
129 QComboBox *m_methodCombo = nullptr;
130 QLabel *m_paramLabels[mesh::kInfilMaxParams] = {};
131 QDoubleSpinBox *m_paramSpins[mesh::kInfilMaxParams] = {};
132 QComboBox *m_destCombo = nullptr;
133 QRadioButton *m_writeCells = nullptr;
134 QRadioButton *m_writeTag = nullptr;
135 QLabel *m_statusLbl = nullptr;
136 QPushButton *m_applyBtn = nullptr;
137};
138
139} // namespace openswmmvis::ui
140
141#endif // OPENSWMMVIS_UI_DIALOGS_INFILASSIGNTOSELECTIONDIALOG_H
The central map display widget — QGIS-style hybrid rendering.
Definition mapcanvas.h:63
Definition swmm2dmeshlayer.h:64
Owner of the canonical selection set for one SWMM project.
Definition selectionmanager.h:112
Definition infilassigntoselectiondialog.h:63
static void showFor(SWMM2DMeshLayer *meshLayer, MapCanvas *canvas, SelectionManager *selection, const QString &depthUnitLabel, QWidget *parent)
Create-or-raise the one instance, bound to meshLayer.
Definition infilassigntoselectiondialog.cpp:34
void rebind(SWMM2DMeshLayer *meshLayer, MapCanvas *canvas, SelectionManager *selection, const QString &depthUnitLabel)
Point the dialog at another project's mesh / canvas / selection.
Definition infilassigntoselectiondialog.cpp:84
Per-cell 2D infiltration: value types, tag/override resolution and method↔parameter masks.
InfilMethod
Definition meshinfil.h:61
constexpr int kInfilMaxParams
Definition meshinfil.h:79
Definition openswmmvislayer.h:43
QVector< int > parent
union-find
Definition pslgminsize.cpp:176
One infiltration specification: method + positional parameters + destination.
Definition meshinfil.h:98