Logo Search packages:      
Sourcecode: cantor version File versions  Download package

Public Types | Public Slots | Signals | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes

RHighlighter Class Reference

Inheritance diagram for RHighlighter:
Inheritance graph
[legend]
Collaboration diagram for RHighlighter:
Collaboration graph
[legend]

List of all members.

Public Types

enum  { BlockTypeProperty = QTextFormat::UserProperty +25 }
enum  BlockType {
  UnknownBlock = 0, ErrorBlock = 1, ResultBlock = 2, CommandBlock = 3,
  NoHighlightBlock = 4
}

Public Slots

void refreshSyntaxRegExps ()

Signals

void syntaxRegExps (QVector< QRegExp > &, QVector< QRegExp > &)

Public Member Functions

 RHighlighter (QTextEdit *edit)

Protected Member Functions

template<class Container >
void addFunctions (const Container &functions)
template<class Container >
void addKeywords (const Container &keywords)
void addPair (const QChar &openSymbol, const QChar &closeSymbol)
void addRule (const QRegExp &regexp, const QTextCharFormat &format)
void addRule (const QString &word, const QTextCharFormat &format)
template<class Container >
void addRules (const Container &conditions, const QTextCharFormat &format)
template<class Container >
void addVariables (const Container &variables)
QTextCharFormat commentFormat () const
BlockType currentBlockType ()
QTextCharFormat errorFormat () const
QTextCharFormat functionFormat () const
void highlightBlock (const QString &text)
void highlightPairs (const QString &text)
void highlightRegExps (const QString &text)
void highlightWords (const QString &text)
QTextCharFormat keywordFormat () const
QTextCharFormat matchingPairFormat () const
QTextCharFormat numberFormat () const
QTextCharFormat objectFormat () const
QTextCharFormat operatorFormat () const
void removeRule (const QRegExp &regexp)
void removeRule (const QString &word)
template<class Container >
void removeRules (const Container &conditions)
bool skipHighlighting (const QString &text)
QTextCharFormat stringFormat () const
QTextCharFormat variableFormat () const

Private Member Functions

void formatRule (const QRegExp &p, const QTextCharFormat &fmt, const QString &text, bool shift=false)
void massFormat (const QVector< QRegExp > &rules, const QTextCharFormat &fmt, const QString &text, bool shift=false)

Private Attributes

QVector< QRegExp > functions
QVector< QRegExp > keywords
QVector< QRegExp > operators
QVector< QRegExp > specials
QVector< QRegExp > variables

Static Private Attributes

static const QStringList keywords_list = "NaN"
static const QStringList operators_list = "%[^%]*%"
static const QStringList specials_list = "ERROR"

Detailed Description

Definition at line 26 of file rhighlighter.h.


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

Generated by  Doxygen 1.6.0   Back to index