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::controls::RuleValidator Class Reference

#include <rulevalidator.h>

Inheritance diagram for openswmmvis::controls::RuleValidator:
Collaboration diagram for openswmmvis::controls::RuleValidator:

Classes

struct  Result
 

Public Member Functions

 RuleValidator (SWMMModelLayer *layer, QObject *parent=nullptr)
 Construct over a layer. The validator pulls the engine handle lazily on each validate so a project-switch surfaces the new engine without explicit re-binding.
 
 ~RuleValidator () override
 
Result validate (const QString &text) const
 Synchronous validation. Returns immediately. Used by tests and the list-model's initial population pass.
 
void validateDebounced (ControlRuleProvider *provider, const QString &text)
 Debounced validation. Schedules a validate call after debounceMs() of edit quiescence, then emits provider->setValidation(...) on completion. Multiple calls within the debounce window coalesce into one.
 
int debounceMs () const noexcept
 
void setDebounceMs (int ms) noexcept
 

Constructor & Destructor Documentation

◆ RuleValidator()

openswmmvis::controls::RuleValidator::RuleValidator ( SWMMModelLayer layer,
QObject *  parent = nullptr 
)
explicit

Construct over a layer. The validator pulls the engine handle lazily on each validate so a project-switch surfaces the new engine without explicit re-binding.

◆ ~RuleValidator()

openswmmvis::controls::RuleValidator::~RuleValidator ( )
overridedefault

Member Function Documentation

◆ debounceMs()

int openswmmvis::controls::RuleValidator::debounceMs ( ) const
inlinenoexcept

◆ setDebounceMs()

void openswmmvis::controls::RuleValidator::setDebounceMs ( int  ms)
inlinenoexcept

◆ validate()

RuleValidator::Result openswmmvis::controls::RuleValidator::validate ( const QString &  text) const

Synchronous validation. Returns immediately. Used by tests and the list-model's initial population pass.

◆ validateDebounced()

void openswmmvis::controls::RuleValidator::validateDebounced ( ControlRuleProvider provider,
const QString &  text 
)

Debounced validation. Schedules a validate call after debounceMs() of edit quiescence, then emits provider->setValidation(...) on completion. Multiple calls within the debounce window coalesce into one.

Here is the call graph for this function:

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