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

#include <gwfexpressionedit.h>

Inheritance diagram for openswmmvis::ui::GwfExpressionEdit:
Collaboration diagram for openswmmvis::ui::GwfExpressionEdit:

Signals

void validationChanged (bool ok, const QString &msg, int col)
 
void editingFinished ()
 Enter/Return pressed (single-line commit)
 

Public Member Functions

 GwfExpressionEdit (void *engineHandle, QWidget *parent=nullptr)
 
QString expression () const
 
void setExpression (const QString &text)
 
void validateNow ()
 
bool isValid () const
 
QStringList variableNames () const
 
QStringList variableDescriptions () const
 
QStringList functionNames () const
 
void insertAtCursor (const QString &text)
 

Protected Member Functions

void keyPressEvent (QKeyEvent *e) override
 
void focusInEvent (QFocusEvent *e) override
 

Detailed Description

Single-line [GWF] expression editor: highlighter + Ctrl+Space / 2-char-prefix completion (name — description) + debounced engine validation via swmm_gwf_validate_expression on the injected handle.

Constructor & Destructor Documentation

◆ GwfExpressionEdit()

openswmmvis::ui::GwfExpressionEdit::GwfExpressionEdit ( void *  engineHandle,
QWidget *  parent = nullptr 
)
explicit
Here is the call graph for this function:

Member Function Documentation

◆ editingFinished

void openswmmvis::ui::GwfExpressionEdit::editingFinished ( )
signal

Enter/Return pressed (single-line commit)

Here is the caller graph for this function:

◆ expression()

QString openswmmvis::ui::GwfExpressionEdit::expression ( ) const
inline

◆ focusInEvent()

void openswmmvis::ui::GwfExpressionEdit::focusInEvent ( QFocusEvent *  e)
overrideprotected

◆ functionNames()

QStringList openswmmvis::ui::GwfExpressionEdit::functionNames ( ) const
inline

◆ insertAtCursor()

void openswmmvis::ui::GwfExpressionEdit::insertAtCursor ( const QString &  text)

Insert text at the cursor (Insert-variable menu).

◆ isValid()

bool openswmmvis::ui::GwfExpressionEdit::isValid ( ) const
inline

Last verdict from validateNow() (true until the first run).

◆ keyPressEvent()

void openswmmvis::ui::GwfExpressionEdit::keyPressEvent ( QKeyEvent *  e)
overrideprotected
Here is the call graph for this function:

◆ setExpression()

void openswmmvis::ui::GwfExpressionEdit::setExpression ( const QString &  text)
Here is the call graph for this function:

◆ validateNow()

void openswmmvis::ui::GwfExpressionEdit::validateNow ( )

Run validation immediately (also runs debounced on every edit).

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

◆ validationChanged

void openswmmvis::ui::GwfExpressionEdit::validationChanged ( bool  ok,
const QString &  msg,
int  col 
)
signal

ok=true → msg empty; otherwise the engine diagnostic + 0-based column (-1 when not attributable). Empty text reports ok with an empty message (clearing removes the expression).

Here is the caller graph for this function:

◆ variableDescriptions()

QStringList openswmmvis::ui::GwfExpressionEdit::variableDescriptions ( ) const
inline

◆ variableNames()

QStringList openswmmvis::ui::GwfExpressionEdit::variableNames ( ) const
inline

Engine vocabulary as loaded at construction — variables in the engine's order, descriptions parallel to variableNames(). Used by the dialog's "Insert variable" menu.


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