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

#include <rulesyntaxhighlighter.h>

Inheritance diagram for openswmmvis::controls::RuleSyntaxHighlighter:
Collaboration diagram for openswmmvis::controls::RuleSyntaxHighlighter:

Public Member Functions

 RuleSyntaxHighlighter (QTextDocument *parent=nullptr)
 
 ~RuleSyntaxHighlighter () override
 
void setPalette (const QPalette &palette)
 Rebuild text formats from the supplied palette. Editor calls this whenever the application palette changes (theme switch).
 

Static Public Member Functions

static QStringList blockKeywords ()
 RULE, IF, THEN, ELSE, AND, OR, NOT, PRIORITY.
 
static QStringList objectTypes ()
 NODE, LINK, CONDUIT, PUMP, ORIFICE, WEIR, OUTLET, SUBCATCH, SIMULATION, GAGE.
 
static QStringList variableNames ()
 DEPTH, HEAD, FLOW, VOLUME, INFLOW, SETTING, STATUS, CLOCKTIME, DATE, MONTH, DAY, TIME, OVERFLOW.
 
static QStringList operatorTokens ()
 =, <, >, <=, >=, <>, IS
 
static QStringList allKeywords ()
 Every keyword the completer can offer (block + object + variable). The completer's context-keyed picker still subsets these by preceding token, but the registry of valid tokens is owned here.
 

Protected Member Functions

void highlightBlock (const QString &text) override
 

Constructor & Destructor Documentation

◆ RuleSyntaxHighlighter()

openswmmvis::controls::RuleSyntaxHighlighter::RuleSyntaxHighlighter ( QTextDocument *  parent = nullptr)
explicit

◆ ~RuleSyntaxHighlighter()

openswmmvis::controls::RuleSyntaxHighlighter::~RuleSyntaxHighlighter ( )
overridedefault

Member Function Documentation

◆ allKeywords()

QStringList openswmmvis::controls::RuleSyntaxHighlighter::allKeywords ( )
static

Every keyword the completer can offer (block + object + variable). The completer's context-keyed picker still subsets these by preceding token, but the registry of valid tokens is owned here.

◆ blockKeywords()

QStringList openswmmvis::controls::RuleSyntaxHighlighter::blockKeywords ( )
static

RULE, IF, THEN, ELSE, AND, OR, NOT, PRIORITY.

◆ highlightBlock()

void openswmmvis::controls::RuleSyntaxHighlighter::highlightBlock ( const QString &  text)
overrideprotected

◆ objectTypes()

QStringList openswmmvis::controls::RuleSyntaxHighlighter::objectTypes ( )
static

NODE, LINK, CONDUIT, PUMP, ORIFICE, WEIR, OUTLET, SUBCATCH, SIMULATION, GAGE.

◆ operatorTokens()

QStringList openswmmvis::controls::RuleSyntaxHighlighter::operatorTokens ( )
static

=, <, >, <=, >=, <>, IS

◆ setPalette()

void openswmmvis::controls::RuleSyntaxHighlighter::setPalette ( const QPalette &  palette)

Rebuild text formats from the supplied palette. Editor calls this whenever the application palette changes (theme switch).

Here is the caller graph for this function:

◆ variableNames()

QStringList openswmmvis::controls::RuleSyntaxHighlighter::variableNames ( )
static

DEPTH, HEAD, FLOW, VOLUME, INFLOW, SETTING, STATUS, CLOCKTIME, DATE, MONTH, DAY, TIME, OVERFLOW.


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