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
typeconversionflow.h
Go to the documentation of this file.
1
15#ifndef OPENSWMMVIS_UI_DIALOGS_TYPECONVERSIONFLOW_H
16#define OPENSWMMVIS_UI_DIALOGS_TYPECONVERSIONFLOW_H
17
18#include <QCoreApplication>
19#include <QString>
20#include <QStringList>
21
22class QWidget;
23class SWMMModelLayer;
24
25namespace openswmmvis::ui {
26
28{
29 Q_DECLARE_TR_FUNCTIONS(TypeConversionFlow)
30public:
32
37 static constexpr int kVirtualNodeType = 4;
38
44 static constexpr int kInletNodeType = 5;
45
50 static QString nodeTypeLabel(int swmmNodeType);
51
54 static QString linkTypeLabel(int swmmLinkType);
55
58 static QString confirmText(bool isNode, const QString &name,
59 int currentType, int newType);
60
63 static QString summaryHtml(const QStringList &cleared,
64 const QStringList &warnings);
65
71 static bool run(QWidget *parent, SWMMModelLayer *layer, bool isNode,
72 const QString &name, int currentType, int newType);
73
80 static bool runToInletJunction(QWidget *parent, SWMMModelLayer *layer,
81 const QString &name, int currentType,
82 const QString &inletDesign,
83 const QString &captureNode,
84 int placement);
85};
86
87} // namespace openswmmvis::ui
88
89#endif // OPENSWMMVIS_UI_DIALOGS_TYPECONVERSIONFLOW_H
Renders the SWMM network elements (nodes, links, subcatchments, rain gages) for one OpenSWMMEngine mo...
Definition swmmmodellayer.h:133
Definition typeconversionflow.h:28
static constexpr int kVirtualNodeType
GUI-only pseudo node type for the Convert To flow: a virtual junction (engine-side it is a JUNCTION w...
Definition typeconversionflow.h:37
static constexpr int kInletNodeType
GUI-only pseudo node type for an inlet junction: engine-side a JUNCTION with BOTH is_virtual and is_i...
Definition typeconversionflow.h:44
static QString linkTypeLabel(int swmmLinkType)
User-facing label for a SWMM_LinkType value (Conduit / Pump / Orifice / Weir / Outlet)....
Definition typeconversionflow.cpp:32
static QString confirmText(bool isNode, const QString &name, int currentType, int newType)
Pre-conversion confirmation text warning that the old type's specific attributes will be lost....
Definition typeconversionflow.cpp:44
static bool run(QWidget *parent, SWMMModelLayer *layer, bool isNode, const QString &name, int currentType, int newType)
Confirm with the user, then convert via SWMMModelLayer::applyNodeConvert/applyLinkConvert,...
Definition typeconversionflow.cpp:78
static bool runToInletJunction(QWidget *parent, SWMMModelLayer *layer, const QString &name, int currentType, const QString &inletDesign, const QString &captureNode, int placement)
Promote name to an inlet junction: confirm, set the flag (swmm_node_set_inlet), then install the usag...
Definition typeconversionflow.cpp:175
static QString summaryHtml(const QStringList &cleared, const QStringList &warnings)
Post-conversion summary (cleared fields + topology warnings, or "(no side effects)" when both are emp...
Definition typeconversionflow.cpp:58
static QString nodeTypeLabel(int swmmNodeType)
User-facing label for a SWMM_NodeType value (Junction / Outfall / Storage / Divider),...
Definition typeconversionflow.cpp:19
Definition openswmmvislayer.h:43
QVector< int > parent
union-find
Definition pslgminsize.cpp:176
QString name
Definition sectionmodelbuilders.cpp:474