Gui::DockWnd::ReportHighlighter Class Reference

Syntax highlighter to write log or normal messages, warnings and errors in different colors. More...

#include <ReportView.h>

Public Types

enum  Paragraph { Message = 0 , Warning = 1 , Error = 2 , LogText = 3 }
 

Public Member Functions

void highlightBlock (const QString &text)
 Parses the given text and highlight it in the right colors. More...
 
 ReportHighlighter (QTextEdit *)
 
void setErrorColor (const QColor &col)
 Sets the color for error messages to col. More...
 
void setLogColor (const QColor &col)
 Sets the color for log messages to col. More...
 
void setParagraphType (Paragraph)
 Sets the current paragraph type used in ReportOutput. More...
 
void setTextColor (const QColor &col)
 Sets the text color to col. More...
 
void setWarningColor (const QColor &col)
 Sets the color for warnings to col. More...
 
 ~ReportHighlighter ()
 

Detailed Description

Syntax highlighter to write log or normal messages, warnings and errors in different colors.

Author
Werner Mayer

Member Enumeration Documentation

◆ Paragraph

Enumerator
Message 

normal text

Warning 

Warning.

Error 

Error text.

LogText 

Log text.

Constructor & Destructor Documentation

◆ ReportHighlighter()

ReportHighlighter::ReportHighlighter ( QTextEdit edit)

◆ ~ReportHighlighter()

ReportHighlighter::~ReportHighlighter ( )

Member Function Documentation

◆ highlightBlock()

void ReportHighlighter::highlightBlock ( const QString &  text)

Parses the given text and highlight it in the right colors.

References Gui::TextBlockData::block, Error, Gui::TextBlockData::State::length, LogText, Message, and Warning.

◆ setErrorColor()

void ReportHighlighter::setErrorColor ( const QColor &  col)

Sets the color for error messages to col.

Referenced by Gui::DockWnd::ReportOutput::OnChange().

◆ setLogColor()

void ReportHighlighter::setLogColor ( const QColor &  col)

Sets the color for log messages to col.

Referenced by Gui::DockWnd::ReportOutput::OnChange().

◆ setParagraphType()

void ReportHighlighter::setParagraphType ( ReportHighlighter::Paragraph  t)

Sets the current paragraph type used in ReportOutput.

See also
ReportOutput::Message
ReportOutput::Warning
ReportOutput::Error

Referenced by Gui::DockWnd::ReportOutput::customEvent().

◆ setTextColor()

void ReportHighlighter::setTextColor ( const QColor &  col)

Sets the text color to col.

Referenced by Gui::DockWnd::ReportOutput::OnChange().

◆ setWarningColor()

void ReportHighlighter::setWarningColor ( const QColor &  col)

Sets the color for warnings to col.

Referenced by Gui::DockWnd::ReportOutput::OnChange().


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