KSeExpr  4.0.4.0
Classes | Public Member Functions | Private Attributes | List of all members
ExprHighlighter Class Reference

#include <ExprHighlighter.h>

Inheritance diagram for ExprHighlighter:

Classes

struct  HighlightingRule
 

Public Member Functions

 ExprHighlighter (QTextDocument *parent)
 
 ExprHighlighter (QTextEdit *edit)
 
void fixStyle (const QPalette &palette)
 
void init ()
 
void highlightBlock (const QString &text) override
 

Private Attributes

QVector< HighlightingRulehighlightingRules
 
QTextCharFormat singleLineCommentFormat
 
QTextCharFormat variableFormat
 
QTextCharFormat numberFormat
 
QTextCharFormat operatorFormat
 
int lightness
 

Detailed Description

Definition at line 19 of file ExprHighlighter.h.

Constructor & Destructor Documentation

◆ ExprHighlighter() [1/2]

ExprHighlighter::ExprHighlighter ( QTextDocument *  parent)

Definition at line 13 of file ExprHighlighter.cpp.

References init().

◆ ExprHighlighter() [2/2]

ExprHighlighter::ExprHighlighter ( QTextEdit *  edit)

Definition at line 20 of file ExprHighlighter.cpp.

References init().

Member Function Documentation

◆ fixStyle()

void ExprHighlighter::fixStyle ( const QPalette &  palette)

Definition at line 27 of file ExprHighlighter.cpp.

References init(), and lightness.

Referenced by ExprTextEdit::paintEvent(), and ExprTextEdit::updateStyle().

◆ highlightBlock()

void ExprHighlighter::highlightBlock ( const QString &  text)
override

◆ init()

void ExprHighlighter::init ( )

Member Data Documentation

◆ highlightingRules

QVector<HighlightingRule> ExprHighlighter::highlightingRules
private

Definition at line 25 of file ExprHighlighter.h.

Referenced by highlightBlock(), and init().

◆ lightness

int ExprHighlighter::lightness
private

Definition at line 31 of file ExprHighlighter.h.

Referenced by fixStyle(), and init().

◆ numberFormat

QTextCharFormat ExprHighlighter::numberFormat
private

Definition at line 28 of file ExprHighlighter.h.

Referenced by init().

◆ operatorFormat

QTextCharFormat ExprHighlighter::operatorFormat
private

Definition at line 29 of file ExprHighlighter.h.

◆ singleLineCommentFormat

QTextCharFormat ExprHighlighter::singleLineCommentFormat
private

Definition at line 26 of file ExprHighlighter.h.

Referenced by init().

◆ variableFormat

QTextCharFormat ExprHighlighter::variableFormat
private

Definition at line 27 of file ExprHighlighter.h.

Referenced by init().


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