Output window to show messages. More...
#include <ReportView.h>
Classes | |
class | Data |
Public Slots | |
void | onSaveAs () |
Save the report messages into a file. More... | |
void | onToggleError () |
Toggles the report of errors. More... | |
void | onToggleGoToEnd () |
Toggles the report to go to the end if new messages appear. More... | |
void | onToggleLogging () |
Toggles the report of log messages. More... | |
void | onToggleRedirectPythonStderr () |
Toggles the redirection of Python stderr. More... | |
void | onToggleRedirectPythonStdout () |
Toggles the redirection of Python stdout. More... | |
void | onToggleShowReportViewOnError () |
Toggles whether to show report view on errors. More... | |
void | onToggleShowReportViewOnLogMessage () |
Toggles whether to show report view on log messages. More... | |
void | onToggleShowReportViewOnNormalMessage () |
Toggles whether to show report view on normal messages. More... | |
void | onToggleShowReportViewOnWarning () |
Toggles whether to show report view on warnings. More... | |
void | onToggleWarning () |
Toggles the report of warnings. More... | |
Public Member Functions | |
bool | isError () const |
Returns true whether errors are reported. More... | |
bool | isLogging () const |
Returns true whether log messages are reported. More... | |
bool | isWarning () const |
Returns true whether warnings are reported. More... | |
const char * | Name (void) override |
returns the name for observer handling More... | |
void | OnChange (Base::Subject< const char * > &rCaller, const char *sReason) override |
Observes its parameter group. More... | |
ReportOutput (QWidget *parent=0) | |
Constructs a ReportOutput which is a child of 'parent', with the name 'name' and widget flags set to 'f'. More... | |
void | restoreFont () |
Restore the default font settings. More... | |
void | SendLog (const std::string &msg, Base::LogStyle level) override |
Used to send a Log message at the given level. More... | |
virtual | ~ReportOutput () |
Destroys the object and frees any allocated resources. More... | |
Public Member Functions inherited from Gui::WindowParameter | |
ParameterGrp::handle | getWindowParameter (void) |
return the parameter group of this window More... | |
void | OnChange (Base::Subject< const char * > &rCaller, const char *sReason) |
bool | setGroupName (const char *name) |
Sets the group of the window to name. More... | |
WindowParameter (const char *name) | |
virtual | ~WindowParameter () |
Public Member Functions inherited from Base::ILogger | |
ILogger () | |
virtual | ~ILogger ()=0 |
Protected Member Functions | |
void | changeEvent (QEvent *) override |
Handles the change of style sheets. More... | |
void | contextMenuEvent (QContextMenuEvent *e) override |
Pops up the context menu with some extensions. More... | |
void | customEvent (QEvent *ev) override |
For internal use only. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Gui::WindowParameter | |
static ParameterGrp::handle | getDefaultParameter (void) |
get the parameters More... | |
Public Attributes inherited from Base::ILogger | |
bool | bErr |
bool | bLog |
bool | bMsg |
bool | bWrn |
Detailed Description
Output window to show messages.
- See also
- Base::ILogger
- QTextEdit
Constructor & Destructor Documentation
◆ ReportOutput()
ReportOutput::ReportOutput | ( | QWidget * | parent = 0 | ) |
Constructs a ReportOutput which is a child of 'parent', with the name 'name' and widget flags set to 'f'.
References Base::Subject< _MessageType >::Attach(), Base::ConsoleSingleton::AttachObserver(), Base::ILogger::bLog, Base::Console(), Gui::WindowParameter::getDefaultParameter(), ParameterGrp::GetGroup(), Gui::WindowParameter::getWindowParameter(), ParameterGrp::NotifyAll(), and restoreFont().
◆ ~ReportOutput()
|
virtual |
Destroys the object and frees any allocated resources.
References Base::Console(), Base::Subject< _MessageType >::Detach(), Base::ConsoleSingleton::DetachObserver(), and Gui::WindowParameter::getWindowParameter().
Member Function Documentation
◆ changeEvent()
|
overrideprotected |
Handles the change of style sheets.
References ParameterGrp::GetUnsigned(), Gui::WindowParameter::getWindowParameter(), and ParameterGrp::SetUnsigned().
◆ contextMenuEvent()
|
overrideprotected |
Pops up the context menu with some extensions.
References Base::ILogger::bErr, Base::ILogger::bLog, Base::ILogger::bWrn, onSaveAs(), onToggleError(), onToggleGoToEnd(), onToggleLogging(), onToggleRedirectPythonStderr(), onToggleRedirectPythonStdout(), onToggleWarning(), Gui::DockWnd::ReportOutput::Data::redirected_stderr, and Gui::DockWnd::ReportOutput::Data::redirected_stdout.
◆ customEvent()
|
overrideprotected |
For internal use only.
References CustomReportEvent::message(), CustomReportEvent::messageType(), and Gui::DockWnd::ReportHighlighter::setParagraphType().
◆ isError()
bool ReportOutput::isError | ( | ) | const |
Returns true whether errors are reported.
References Base::ILogger::bErr.
◆ isLogging()
bool ReportOutput::isLogging | ( | ) | const |
Returns true whether log messages are reported.
References Base::ILogger::bLog.
◆ isWarning()
bool ReportOutput::isWarning | ( | ) | const |
Returns true whether warnings are reported.
References Base::ILogger::bWrn.
◆ Name()
|
overridevirtual |
returns the name for observer handling
Reimplemented from Base::ILogger.
◆ OnChange()
|
override |
Observes its parameter group.
References Base::ILogger::bErr, Base::ILogger::bLog, Base::ILogger::bWrn, ParameterGrp::GetASCII(), ParameterGrp::GetBool(), ParameterGrp::GetInt(), ParameterGrp::GetUnsigned(), onToggleRedirectPythonStderr(), onToggleRedirectPythonStdout(), Gui::DockWnd::ReportOutput::Data::redirected_stderr, Gui::DockWnd::ReportOutput::Data::redirected_stdout, Gui::DockWnd::ReportHighlighter::setErrorColor(), Gui::DockWnd::ReportHighlighter::setLogColor(), Gui::DockWnd::ReportHighlighter::setTextColor(), and Gui::DockWnd::ReportHighlighter::setWarningColor().
◆ onSaveAs
|
slot |
Save the report messages into a file.
Referenced by contextMenuEvent().
◆ onToggleError
|
slot |
Toggles the report of errors.
References Base::ILogger::bErr, Gui::WindowParameter::getWindowParameter(), and ParameterGrp::SetBool().
Referenced by contextMenuEvent().
◆ onToggleGoToEnd
|
slot |
Toggles the report to go to the end if new messages appear.
References Gui::WindowParameter::getWindowParameter(), and ParameterGrp::SetBool().
Referenced by contextMenuEvent().
◆ onToggleLogging
|
slot |
Toggles the report of log messages.
References Base::ILogger::bLog, Gui::WindowParameter::getWindowParameter(), and ParameterGrp::SetBool().
Referenced by contextMenuEvent().
◆ onToggleRedirectPythonStderr
|
slot |
Toggles the redirection of Python stderr.
References Gui::DockWnd::ReportOutput::Data::default_stderr, Gui::WindowParameter::getWindowParameter(), Gui::DockWnd::ReportOutput::Data::redirected_stderr, Gui::DockWnd::ReportOutput::Data::replace_stderr, and ParameterGrp::SetBool().
Referenced by contextMenuEvent(), and OnChange().
◆ onToggleRedirectPythonStdout
|
slot |
Toggles the redirection of Python stdout.
References Gui::DockWnd::ReportOutput::Data::default_stdout, Gui::WindowParameter::getWindowParameter(), Gui::DockWnd::ReportOutput::Data::redirected_stdout, Gui::DockWnd::ReportOutput::Data::replace_stdout, and ParameterGrp::SetBool().
Referenced by contextMenuEvent(), and OnChange().
◆ onToggleShowReportViewOnError
|
slot |
Toggles whether to show report view on errors.
References ParameterGrp::GetBool(), Gui::WindowParameter::getWindowParameter(), and ParameterGrp::SetBool().
◆ onToggleShowReportViewOnLogMessage
|
slot |
Toggles whether to show report view on log messages.
References ParameterGrp::GetBool(), Gui::WindowParameter::getWindowParameter(), and ParameterGrp::SetBool().
◆ onToggleShowReportViewOnNormalMessage
|
slot |
Toggles whether to show report view on normal messages.
References ParameterGrp::GetBool(), Gui::WindowParameter::getWindowParameter(), and ParameterGrp::SetBool().
◆ onToggleShowReportViewOnWarning
|
slot |
Toggles whether to show report view on warnings.
References ParameterGrp::GetBool(), Gui::WindowParameter::getWindowParameter(), and ParameterGrp::SetBool().
◆ onToggleWarning
|
slot |
Toggles the report of warnings.
References Base::ILogger::bWrn, Gui::WindowParameter::getWindowParameter(), and ParameterGrp::SetBool().
Referenced by contextMenuEvent().
◆ restoreFont()
void ReportOutput::restoreFont | ( | ) |
Restore the default font settings.
Referenced by ReportOutput().
◆ SendLog()
|
overridevirtual |
Used to send a Log message at the given level.
Implements Base::ILogger.
References Gui::DockWnd::ReportHighlighter::Error, Base::Error, Base::Log, Gui::DockWnd::ReportHighlighter::LogText, Gui::DockWnd::ReportHighlighter::Message, Base::Message, Gui::DockWnd::ReportHighlighter::Warning, and Base::Warning.
The documentation for this class was generated from the following files:
- src/Gui/ReportView.h
- src/Gui/ReportView.cpp