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
comprehensiveeditorregistry.h
Go to the documentation of this file.
1
27#ifndef COMPREHENSIVEEDITORREGISTRY_H
28#define COMPREHENSIVEEDITORREGISTRY_H
29
31
32#include <QHash>
33#include <QString>
34#include <functional>
35
36class QUndoStack;
37class QWidget;
38
45{
46public:
53 using OpenCreateFn = std::function<void(SWMMModelLayer *layer,
54 QUndoStack *undoStack,
55 QWidget *parent)>;
56
67
69
72
74 [[nodiscard]] const Entry *find(SWMMModelLayer::DataCategory cat) const noexcept;
75
77 [[nodiscard]] bool hasEditor(SWMMModelLayer::DataCategory cat) const noexcept;
78
81 [[nodiscard]] QString gapTooltip(SWMMModelLayer::DataCategory cat) const;
82
84 [[nodiscard]] QString editorTitle(SWMMModelLayer::DataCategory cat) const;
85
86private:
88
89 QHash<int, Entry> m_entries;
90};
91
92#endif // COMPREHENSIVEEDITORREGISTRY_H
Singleton mapping SWMMModelLayer::DataCategory → comprehensive editor metadata + create-new dispatch.
Definition comprehensiveeditorregistry.h:45
std::function< void(SWMMModelLayer *layer, QUndoStack *undoStack, QWidget *parent)> OpenCreateFn
Definition comprehensiveeditorregistry.h:55
void registerEditor(SWMMModelLayer::DataCategory cat, Entry entry)
Definition comprehensiveeditorregistry.cpp:557
bool hasEditor(SWMMModelLayer::DataCategory cat) const noexcept
Definition comprehensiveeditorregistry.cpp:570
QString gapTooltip(SWMMModelLayer::DataCategory cat) const
Definition comprehensiveeditorregistry.cpp:576
const Entry * find(SWMMModelLayer::DataCategory cat) const noexcept
Definition comprehensiveeditorregistry.cpp:564
static ComprehensiveEditorRegistry & instance()
Definition comprehensiveeditorregistry.cpp:545
QString editorTitle(SWMMModelLayer::DataCategory cat) const
Definition comprehensiveeditorregistry.cpp:583
Renders the SWMM network elements (nodes, links, subcatchments, rain gages) for one OpenSWMMEngine mo...
Definition swmmmodellayer.h:133
DataCategory
Slice BM.0 — non-spatial data-object categories surfaced below the spatial section in the Object Brow...
Definition swmmmodellayer.h:182
QVector< int > parent
union-find
Definition pslgminsize.cpp:176
Definition comprehensiveeditorregistry.h:57
OpenCreateFn openBrowse
Definition comprehensiveeditorregistry.h:65
QString gapSliceLabel
Populated only when openCreateNew is null.
Definition comprehensiveeditorregistry.h:59
QString editorTitle
User-visible name, e.g. "Curve Editor".
Definition comprehensiveeditorregistry.h:58
OpenCreateFn openCreateNew
Null iff editor is not yet shipped.
Definition comprehensiveeditorregistry.h:60
Map layer that renders an OpenSWMMEngine network (nodes, links, subcatchments, rain gages) and provid...