Gui::DockWnd::ReportHighlighter Class Reference

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

#include <ReportView.h>

List of all members.

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.
 ReportHighlighter (QTextEdit *)
void setErrorColor (const QColor &col)
 Sets the color for error messages to col.
void setLogColor (const QColor &col)
 Sets the color for log messages to col.
void setParagraphType (Paragraph)
 Sets the current paragraph type used in ReportOutput.
void setTextColor (const QColor &col)
 Sets the text color to col.
void setWarningColor (const QColor &col)
 Sets the color for warnings to col.
 ~ReportHighlighter ()

Detailed Description

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

Author:
Werner Mayer

Definition at line 67 of file ReportView.h.


Member Enumeration Documentation

Enumerator:
Message 

normal text

Warning 

Warning.

Error 

Error text.

LogText 

Log text.

Definition at line 70 of file ReportView.h.


Constructor & Destructor Documentation

ReportHighlighter::ReportHighlighter ( QTextEdit *  edit  ) 

Definition at line 121 of file ReportView.cpp.

ReportHighlighter::~ReportHighlighter (  ) 

Definition at line 130 of file ReportView.cpp.


Member Function Documentation

void ReportHighlighter::highlightBlock ( const QString &  text  ) 

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

Definition at line 134 of file ReportView.cpp.

References FemExample::b, Gui::TextBlockData::block, Error, Gui::TextBlockData::State::length, LogText, Message, Sketcher::start, Gui::TextBlockData::State::type, and Warning.

void ReportHighlighter::setErrorColor ( const QColor &  col  ) 

Sets the color for error messages to col.

Definition at line 194 of file ReportView.cpp.

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

void ReportHighlighter::setLogColor ( const QColor &  col  ) 

Sets the color for log messages to col.

Definition at line 184 of file ReportView.cpp.

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

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

Sets the current paragraph type used in ReportOutput.

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

Definition at line 174 of file ReportView.cpp.

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

void ReportHighlighter::setTextColor ( const QColor &  col  ) 

Sets the text color to col.

Definition at line 179 of file ReportView.cpp.

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

void ReportHighlighter::setWarningColor ( const QColor &  col  ) 

Sets the color for warnings to col.

Definition at line 189 of file ReportView.cpp.

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


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

Generated on Wed Nov 23 19:02:11 2011 for FreeCAD by  doxygen 1.6.1