umbrello 2.34.70-5524f40e1
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
Classes | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
CodeTextHighlighter Class Reference

#include <codetexthighlighter.h>

Inheritance diagram for CodeTextHighlighter:
Collaboration diagram for CodeTextHighlighter:

Classes

struct  HighlightingRule
 

Public Member Functions

 CodeTextHighlighter (QTextDocument *parent=0)
 

Protected Member Functions

void highlightBlock (const QString &text)
 

Private Member Functions

QStringList keywords ()
 

Private Attributes

QVector< HighlightingRulem_highlightingRules
 
QRegExp m_commentStartExpression
 
QRegExp m_commentEndExpression
 
QTextCharFormat m_keywordFormat
 
QTextCharFormat m_classFormat
 
QTextCharFormat m_singleLineCommentFormat
 
QTextCharFormat m_multiLineCommentFormat
 
QTextCharFormat m_quotationFormat
 
QTextCharFormat m_functionFormat
 

Constructor & Destructor Documentation

◆ CodeTextHighlighter()

CodeTextHighlighter::CodeTextHighlighter ( QTextDocument *  parent = 0)
explicit

Constructor. Creates the highlighting rule by calling the function keywords().

Parameters
parentthe parent QTextDocument
Here is the call graph for this function:

Member Function Documentation

◆ highlightBlock()

void CodeTextHighlighter::highlightBlock ( const QString &  text)
protected

Does highlighting the code block.

Parameters
textthe code block to highlight

◆ keywords()

QStringList CodeTextHighlighter::keywords ( )
private

Create a list of keywords for the selected programming language.

Returns
list of keywords
Here is the call graph for this function:

Member Data Documentation

◆ m_classFormat

QTextCharFormat CodeTextHighlighter::m_classFormat
private

◆ m_commentEndExpression

QRegExp CodeTextHighlighter::m_commentEndExpression
private

◆ m_commentStartExpression

QRegExp CodeTextHighlighter::m_commentStartExpression
private

◆ m_functionFormat

QTextCharFormat CodeTextHighlighter::m_functionFormat
private

◆ m_highlightingRules

QVector<HighlightingRule> CodeTextHighlighter::m_highlightingRules
private

◆ m_keywordFormat

QTextCharFormat CodeTextHighlighter::m_keywordFormat
private

◆ m_multiLineCommentFormat

QTextCharFormat CodeTextHighlighter::m_multiLineCommentFormat
private

◆ m_quotationFormat

QTextCharFormat CodeTextHighlighter::m_quotationFormat
private

◆ m_singleLineCommentFormat

QTextCharFormat CodeTextHighlighter::m_singleLineCommentFormat
private

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