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 () | |
Syntax highlighter to write log or normal messages, warnings and errors in different colors.
ReportHighlighter::ReportHighlighter | ( | QTextEdit * | edit | ) |
ReportHighlighter::~ReportHighlighter | ( | ) |
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.
void ReportHighlighter::setErrorColor | ( | const QColor & | col | ) |
Sets the color for error messages to col.
Referenced by Gui::DockWnd::ReportOutput::OnChange().
void ReportHighlighter::setLogColor | ( | const QColor & | col | ) |
Sets the color for log messages to col.
Referenced by Gui::DockWnd::ReportOutput::OnChange().
void ReportHighlighter::setParagraphType | ( | ReportHighlighter::Paragraph | t | ) |
Sets the current paragraph type used in ReportOutput.
Referenced by Gui::DockWnd::ReportOutput::customEvent().
void ReportHighlighter::setTextColor | ( | const QColor & | col | ) |
Sets the text color to col.
Referenced by Gui::DockWnd::ReportOutput::OnChange().
void ReportHighlighter::setWarningColor | ( | const QColor & | col | ) |
Sets the color for warnings to col.
Referenced by Gui::DockWnd::ReportOutput::OnChange().