umbrello 26.03.70-1a62d36 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

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:

## Classes

struct | HighlightingRule

## Public Member Functions

| CodeTextHighlighter (QTextDocument *parent=nullptr)

## Protected Member Functions

void | highlightBlock (const QString &text)

## Private Member Functions

QStringList | keywords ()

## Private Attributes

QVector< HighlightingRule > | m_highlightingRules
QRegularExpression | m_commentStartExpression
QRegularExpression | 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 = `nullptr` | ) |

explicit

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

Parameters

  parent | the parent QTextDocument

## Member Function Documentation

## ◆ highlightBlock()

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

protected

Does highlighting the code block.

Parameters

  text | the code block to highlight

## ◆ keywords()

QStringList CodeTextHighlighter::keywords | ( |  | ) |

private

Create a list of keywords for the selected programming language.

Returns
  list of keywords

## Member Data Documentation

## ◆ m_classFormat

QTextCharFormat CodeTextHighlighter::m_classFormat

private

## ◆ m_commentEndExpression

QRegularExpression CodeTextHighlighter::m_commentEndExpression

private

## ◆ m_commentStartExpression

QRegularExpression 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:

- umbrello/dialogs/codetexthighlighter.h
- umbrello/dialogs/codetexthighlighter.cpp