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
openswmmvis::ui::RulesEditorDialog Class Reference

#include <ruleseditordialog.h>

Inheritance diagram for openswmmvis::ui::RulesEditorDialog:
Collaboration diagram for openswmmvis::ui::RulesEditorDialog:

Public Types

enum class  Mode {
  Edit ,
  CreateNew
}
 

Public Member Functions

 RulesEditorDialog (SWMMModelLayer *layer, QUndoStack *undoStack, QWidget *parent=nullptr)
 
 ~RulesEditorDialog () override
 
void openForRule (const QString &name)
 Bring the dialog forward and select name in the list (no-op if absent).
 
Mode mode () const noexcept
 
openswmmvis::controls::ControlRuleProvidercurrentProvider () const noexcept
 
QListView * listView () const noexcept
 
RuleCodeEditorcodeEditor () const noexcept
 
RuleListModellistModel () const noexcept
 
QString pendingName () const
 
bool isCreateEnabled () const
 
void submitCreateNew ()
 
void invokeNew ()
 
void invokeDelete ()
 
bool renameCurrent (const QString &newName)
 
void flushPendingEdit ()
 

Static Public Member Functions

static RulesEditorDialogcreateNew (SWMMModelLayer *layer, QUndoStack *undoStack, QWidget *parent=nullptr)
 Slice BM.0-Add-New factory: same dialog, started in CreateNew mode. Caller owns the returned dialog.
 
static QString pickControlRule (SWMMModelLayer *layer, QUndoStack *undoStack, const QString &initialName, QWidget *parent=nullptr)
 Modal pick / create / edit entry point — mirrors TimeseriesEditorDialog::pickTimeseries. Empty initialName → CreateNew mode; otherwise → Edit mode pre-selecting that rule. Returns the name of the rule currently bound to the dialog on close, or empty if no commit happened. All edits flow through applyControlRule* so the engine state matches on close regardless of which button closes the dialog.
 

Protected Member Functions

void closeEvent (QCloseEvent *e) override
 

Member Enumeration Documentation

◆ Mode

Enumerator
Edit 
CreateNew 

Constructor & Destructor Documentation

◆ RulesEditorDialog()

openswmmvis::ui::RulesEditorDialog::RulesEditorDialog ( SWMMModelLayer layer,
QUndoStack *  undoStack,
QWidget *  parent = nullptr 
)
Here is the call graph for this function:

◆ ~RulesEditorDialog()

openswmmvis::ui::RulesEditorDialog::~RulesEditorDialog ( )
overridedefault

Member Function Documentation

◆ closeEvent()

void openswmmvis::ui::RulesEditorDialog::closeEvent ( QCloseEvent *  e)
overrideprotected
Here is the call graph for this function:

◆ codeEditor()

RuleCodeEditor * openswmmvis::ui::RulesEditorDialog::codeEditor ( ) const
inlinenoexcept

◆ createNew()

RulesEditorDialog * openswmmvis::ui::RulesEditorDialog::createNew ( SWMMModelLayer layer,
QUndoStack *  undoStack,
QWidget *  parent = nullptr 
)
static

Slice BM.0-Add-New factory: same dialog, started in CreateNew mode. Caller owns the returned dialog.

◆ currentProvider()

ControlRuleProvider * openswmmvis::ui::RulesEditorDialog::currentProvider ( ) const
noexcept
Here is the caller graph for this function:

◆ flushPendingEdit()

void openswmmvis::ui::RulesEditorDialog::flushPendingEdit ( )
Here is the caller graph for this function:

◆ invokeDelete()

void openswmmvis::ui::RulesEditorDialog::invokeDelete ( )

◆ invokeNew()

void openswmmvis::ui::RulesEditorDialog::invokeNew ( )
Here is the caller graph for this function:

◆ isCreateEnabled()

bool openswmmvis::ui::RulesEditorDialog::isCreateEnabled ( ) const

◆ listModel()

RuleListModel * openswmmvis::ui::RulesEditorDialog::listModel ( ) const
inlinenoexcept

◆ listView()

QListView * openswmmvis::ui::RulesEditorDialog::listView ( ) const
inlinenoexcept

◆ mode()

Mode openswmmvis::ui::RulesEditorDialog::mode ( ) const
inlinenoexcept

◆ openForRule()

void openswmmvis::ui::RulesEditorDialog::openForRule ( const QString &  name)

Bring the dialog forward and select name in the list (no-op if absent).

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

◆ pendingName()

QString openswmmvis::ui::RulesEditorDialog::pendingName ( ) const

◆ pickControlRule()

QString openswmmvis::ui::RulesEditorDialog::pickControlRule ( SWMMModelLayer layer,
QUndoStack *  undoStack,
const QString &  initialName,
QWidget *  parent = nullptr 
)
static

Modal pick / create / edit entry point — mirrors TimeseriesEditorDialog::pickTimeseries. Empty initialName → CreateNew mode; otherwise → Edit mode pre-selecting that rule. Returns the name of the rule currently bound to the dialog on close, or empty if no commit happened. All edits flow through applyControlRule* so the engine state matches on close regardless of which button closes the dialog.

Here is the call graph for this function:

◆ renameCurrent()

bool openswmmvis::ui::RulesEditorDialog::renameCurrent ( const QString &  newName)
Here is the call graph for this function:

◆ submitCreateNew()

void openswmmvis::ui::RulesEditorDialog::submitCreateNew ( )

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