umbrello  2.35.1
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 ( 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

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

Does highlighting the code block.

Parameters
textthe code block to highlight
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

QTextCharFormat CodeTextHighlighter::m_classFormat
private
QRegExp CodeTextHighlighter::m_commentEndExpression
private
QRegExp CodeTextHighlighter::m_commentStartExpression
private
QTextCharFormat CodeTextHighlighter::m_functionFormat
private
QVector<HighlightingRule> CodeTextHighlighter::m_highlightingRules
private
QTextCharFormat CodeTextHighlighter::m_keywordFormat
private
QTextCharFormat CodeTextHighlighter::m_multiLineCommentFormat
private
QTextCharFormat CodeTextHighlighter::m_quotationFormat
private
QTextCharFormat CodeTextHighlighter::m_singleLineCommentFormat
private

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