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 Class Reference

Singleton mapping SWMMModelLayer::DataCategory → comprehensive editor metadata + create-new dispatch. More...

#include <comprehensiveeditorregistry.h>

Collaboration diagram for ComprehensiveEditorRegistry:

Classes

struct  Entry
 

Public Types

using OpenCreateFn = std::function< void(SWMMModelLayer *layer, QUndoStack *undoStack, QWidget *parent)>
 

Public Member Functions

void registerEditor (SWMMModelLayer::DataCategory cat, Entry entry)
 
const Entryfind (SWMMModelLayer::DataCategory cat) const noexcept
 
bool hasEditor (SWMMModelLayer::DataCategory cat) const noexcept
 
QString gapTooltip (SWMMModelLayer::DataCategory cat) const
 
QString editorTitle (SWMMModelLayer::DataCategory cat) const
 

Static Public Member Functions

static ComprehensiveEditorRegistryinstance ()
 

Detailed Description

Singleton mapping SWMMModelLayer::DataCategory → comprehensive editor metadata + create-new dispatch.

Member Typedef Documentation

◆ OpenCreateFn

using ComprehensiveEditorRegistry::OpenCreateFn = std::function<void(SWMMModelLayer *layer, QUndoStack *undoStack, QWidget *parent)>

Invoked to open the editor in create-new mode.

Parameters
layerActive project layer (non-null; entry is skipped if null).
undoStackOptional canvas undo stack; nullptr is acceptable (editors that take an undo stack can pass it through; those that don't ignore the argument).
parentQWidget parent for the spawned dialog.

Member Function Documentation

◆ editorTitle()

QString ComprehensiveEditorRegistry::editorTitle ( SWMMModelLayer::DataCategory  cat) const

User-visible editor title, or empty when unregistered.

Here is the call graph for this function:

◆ find()

const ComprehensiveEditorRegistry::Entry * ComprehensiveEditorRegistry::find ( SWMMModelLayer::DataCategory  cat) const
noexcept

Returns nullptr when cat is unregistered.

Here is the caller graph for this function:

◆ gapTooltip()

QString ComprehensiveEditorRegistry::gapTooltip ( SWMMModelLayer::DataCategory  cat) const

Tooltip for the disabled action on a gap category. Empty when hasEditor returns true or cat is unregistered.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hasEditor()

bool ComprehensiveEditorRegistry::hasEditor ( SWMMModelLayer::DataCategory  cat) const
noexcept

True iff the entry for cat has a non-null openCreateNew.

Here is the caller graph for this function:

◆ instance()

ComprehensiveEditorRegistry & ComprehensiveEditorRegistry::instance ( )
static
Here is the caller graph for this function:

◆ registerEditor()

void ComprehensiveEditorRegistry::registerEditor ( SWMMModelLayer::DataCategory  cat,
Entry  entry 
)

Insert or replace the entry for cat. Last-write-wins.


The documentation for this class was generated from the following files: