Output window to show messages. More...
#include <ReportView.h>
Classes | |
class | Data |
Public Slots | |
void | onSaveAs () |
Save the report messages into a file. | |
void | onToggleError () |
Toggles the report of errors. | |
void | onToggleGoToEnd () |
Toggles the report to go to the end if new messages appear. | |
void | onToggleLogging () |
Toggles the report of log messages. | |
void | onToggleRedirectPythonStderr () |
Toggles the redirection of Python stderr. | |
void | onToggleRedirectPythonStdout () |
Toggles the redirection of Python stdout. | |
void | onToggleWarning () |
Toggles the report of warnings. | |
Public Member Functions | |
void | Error (const char *s) |
Writes errors. | |
bool | isError () const |
Returns true whether errors are reported. | |
bool | isLogging () const |
Returns true whether log messages are reported. | |
bool | isWarning () const |
Returns true whether warnings are reported. | |
void | Log (const char *s) |
Does not do anything. | |
void | Message (const char *s) |
Writes normal text. | |
const char * | Name (void) |
returns the name for observer handling | |
void | OnChange (Base::Subject< const char * > &rCaller, const char *sReason) |
Observes its parameter group. | |
ReportOutput (QWidget *parent=0) | |
Constructs a ReportOutput which is a child of 'parent', with the name 'name' and widget flags set to 'f'. | |
void | restoreFont () |
Restore the default font settings. | |
void | Warning (const char *s) |
Writes warnings. | |
virtual | ~ReportOutput () |
Destroys the object and frees any allocated resources. | |
Protected Member Functions | |
void | contextMenuEvent (QContextMenuEvent *e) |
Pops up the context menu with some extensions. | |
void | customEvent (QEvent *ev) |
For internal use only. |
Output window to show messages.
Definition at line 124 of file ReportView.h.
ReportOutput::ReportOutput | ( | QWidget * | parent = 0 |
) |
Constructs a ReportOutput which is a child of 'parent', with the name 'name' and widget flags set to 'f'.
Definition at line 284 of file ReportView.cpp.
References Base::ConsoleObserver::bLog, Base::Console(), Gui::WindowParameter::getDefaultParameter(), Gui::WindowParameter::getWindowParameter(), and restoreFont().
ReportOutput::~ReportOutput | ( | ) | [virtual] |
Destroys the object and frees any allocated resources.
Definition at line 310 of file ReportView.cpp.
References Base::Console(), and Gui::WindowParameter::getWindowParameter().
void ReportOutput::contextMenuEvent | ( | QContextMenuEvent * | e | ) | [protected] |
Pops up the context menu with some extensions.
Definition at line 375 of file ReportView.cpp.
References Base::ConsoleObserver::bErr, Base::ConsoleObserver::bLog, Base::ConsoleObserver::bWrn, onSaveAs(), onToggleError(), onToggleGoToEnd(), onToggleLogging(), onToggleRedirectPythonStderr(), onToggleRedirectPythonStdout(), onToggleWarning(), Gui::DockWnd::ReportOutput::Data::redirected_stderr, and Gui::DockWnd::ReportOutput::Data::redirected_stdout.
void ReportOutput::customEvent | ( | QEvent * | ev | ) | [protected] |
For internal use only.
Definition at line 356 of file ReportView.cpp.
References CustomReportEvent::message(), CustomReportEvent::messageType(), and Gui::DockWnd::ReportHighlighter::setParagraphType().
void ReportOutput::Error | ( | const char * | s | ) | [virtual] |
Writes errors.
Implements Base::ConsoleObserver.
Definition at line 339 of file ReportView.cpp.
References Gui::DockWnd::ReportHighlighter::Error.
bool ReportOutput::isError | ( | void | ) | const |
Returns true whether errors are reported.
Definition at line 436 of file ReportView.cpp.
References Base::ConsoleObserver::bErr.
bool ReportOutput::isLogging | ( | ) | const |
Returns true whether log messages are reported.
Definition at line 446 of file ReportView.cpp.
References Base::ConsoleObserver::bLog.
bool ReportOutput::isWarning | ( | ) | const |
Returns true whether warnings are reported.
Definition at line 441 of file ReportView.cpp.
References Base::ConsoleObserver::bWrn.
void ReportOutput::Log | ( | const char * | s | ) | [virtual] |
Does not do anything.
Reimplemented from Base::ConsoleObserver.
Definition at line 346 of file ReportView.cpp.
References Gui::DockWnd::ReportHighlighter::LogText, and draftTools::msg().
void ReportOutput::Message | ( | const char * | s | ) | [virtual] |
Writes normal text.
Reimplemented from Base::ConsoleObserver.
Definition at line 332 of file ReportView.cpp.
References Gui::DockWnd::ReportHighlighter::Message.
const char* Gui::DockWnd::ReportOutput::Name | ( | void | ) | [inline, virtual] |
returns the name for observer handling
Reimplemented from Base::ConsoleObserver.
Definition at line 145 of file ReportView.h.
void ReportOutput::OnChange | ( | Base::Subject< const char * > & | rCaller, | |
const char * | sReason | |||
) |
Observes its parameter group.
Reimplemented from Gui::WindowParameter.
Definition at line 507 of file ReportView.cpp.
References Base::ConsoleObserver::bErr, Base::ConsoleObserver::bLog, Base::ConsoleObserver::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().
void ReportOutput::onSaveAs | ( | ) | [slot] |
Save the report messages into a file.
Definition at line 420 of file ReportView.cpp.
References SketcherExample::f, and RobotExample::t.
Referenced by contextMenuEvent().
void ReportOutput::onToggleError | ( | ) | [slot] |
Toggles the report of errors.
Definition at line 451 of file ReportView.cpp.
References Base::ConsoleObserver::bErr, and Gui::WindowParameter::getWindowParameter().
Referenced by contextMenuEvent().
void ReportOutput::onToggleGoToEnd | ( | ) | [slot] |
Toggles the report to go to the end if new messages appear.
Definition at line 501 of file ReportView.cpp.
References Gui::WindowParameter::getWindowParameter().
Referenced by contextMenuEvent().
void ReportOutput::onToggleLogging | ( | ) | [slot] |
Toggles the report of log messages.
Definition at line 463 of file ReportView.cpp.
References Base::ConsoleObserver::bLog, and Gui::WindowParameter::getWindowParameter().
Referenced by contextMenuEvent().
void ReportOutput::onToggleRedirectPythonStderr | ( | ) | [slot] |
Toggles the redirection of Python stderr.
Definition at line 485 of file ReportView.cpp.
References Gui::DockWnd::ReportOutput::Data::default_stderr, Gui::WindowParameter::getWindowParameter(), Gui::DockWnd::ReportOutput::Data::redirected_stderr, and Gui::DockWnd::ReportOutput::Data::replace_stderr.
Referenced by contextMenuEvent(), and OnChange().
void ReportOutput::onToggleRedirectPythonStdout | ( | ) | [slot] |
Toggles the redirection of Python stdout.
Definition at line 469 of file ReportView.cpp.
References Gui::DockWnd::ReportOutput::Data::default_stdout, Gui::WindowParameter::getWindowParameter(), Gui::DockWnd::ReportOutput::Data::redirected_stdout, and Gui::DockWnd::ReportOutput::Data::replace_stdout.
Referenced by contextMenuEvent(), and OnChange().
void ReportOutput::onToggleWarning | ( | ) | [slot] |
Toggles the report of warnings.
Definition at line 457 of file ReportView.cpp.
References Base::ConsoleObserver::bWrn, and Gui::WindowParameter::getWindowParameter().
Referenced by contextMenuEvent().
void ReportOutput::restoreFont | ( | ) |
Restore the default font settings.
Definition at line 319 of file ReportView.cpp.
Referenced by ReportOutput().
void ReportOutput::Warning | ( | const char * | s | ) | [virtual] |
Writes warnings.
Reimplemented from Base::ConsoleObserver.
Definition at line 325 of file ReportView.cpp.
References Gui::DockWnd::ReportHighlighter::Warning.