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 | onToggleLogMessage () |
Toggles the report of log messages. More... | |
void | onToggleNormalMessage () |
Toggles the report of normal 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 | isLogMessage () const |
Returns true whether log messages are reported. More... | |
bool | isNormalMessage () const |
Returns true whether normal 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=nullptr) | |
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 const char * | Name () |
virtual void | SendLog (const std::string &msg, LogStyle level)=0 |
Used to send a Log message at the given level. More... | |
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... | |
bool | event (QEvent *event) override |
Handle shortcut override events. 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 |
Output window to show messages.
ReportOutput::ReportOutput | ( | QWidget * | parent = nullptr | ) |
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(), Gui::DockWnd::ReportOutput::Data::logMessageSize, Base::Subject< _MessageType >::Notify(), ParameterGrp::NotifyAll(), and restoreFont().
|
virtual |
Destroys the object and frees any allocated resources.
References Base::Console(), Base::Subject< _MessageType >::Detach(), Base::ConsoleSingleton::DetachObserver(), and Gui::WindowParameter::getWindowParameter().
|
overrideprotected |
Handles the change of style sheets.
References ParameterGrp::GetUnsigned(), Gui::WindowParameter::getWindowParameter(), and ParameterGrp::SetUnsigned().
|
overrideprotected |
Pops up the context menu with some extensions.
References Base::ILogger::bErr, Base::ILogger::bLog, Base::ILogger::bMsg, Base::ILogger::bWrn, onSaveAs(), onToggleError(), onToggleGoToEnd(), onToggleLogMessage(), onToggleNormalMessage(), onToggleRedirectPythonStderr(), onToggleRedirectPythonStdout(), onToggleShowReportViewOnError(), onToggleShowReportViewOnLogMessage(), onToggleShowReportViewOnNormalMessage(), onToggleShowReportViewOnWarning(), onToggleWarning(), Gui::DockWnd::ReportOutput::Data::redirected_stderr, Gui::DockWnd::ReportOutput::Data::redirected_stdout, Gui::ReportOutputParameter::showOnError(), Gui::ReportOutputParameter::showOnLogMessage(), Gui::ReportOutputParameter::showOnMessage(), Gui::ReportOutputParameter::showOnWarning(), and draftguitools.gui_setstyle::translate.
|
overrideprotected |
For internal use only.
References ParameterGrp::GetBool(), Gui::WindowParameter::getWindowParameter(), CustomReportEvent::message(), CustomReportEvent::messageType(), and Gui::DockWnd::ReportHighlighter::setParagraphType().
bool ReportOutput::isError | ( | void | ) | const |
Returns true whether errors are reported.
References Base::ILogger::bErr.
bool ReportOutput::isLogMessage | ( | ) | const |
Returns true whether log messages are reported.
References Base::ILogger::bLog.
bool ReportOutput::isNormalMessage | ( | ) | const |
Returns true whether normal messages are reported.
References Base::ILogger::bMsg.
bool ReportOutput::isWarning | ( | ) | const |
Returns true whether warnings are reported.
References Base::ILogger::bWrn.
|
overridevirtual |
returns the name for observer handling
Reimplemented from Base::ILogger.
|
override |
Observes its parameter group.
References Base::ILogger::bErr, Base::ILogger::bLog, Base::ILogger::bMsg, Base::ILogger::bWrn, ParameterGrp::GetASCII(), ParameterGrp::GetBool(), ParameterGrp::GetInt(), ParameterGrp::GetUnsigned(), Gui::QtTools::horizontalAdvance(), Gui::DockWnd::ReportOutput::Data::logMessageSize, 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().
|
slot |
Save the report messages into a file.
Referenced by contextMenuEvent().
|
slot |
Toggles the report of errors.
References Base::ILogger::bErr, Gui::WindowParameter::getWindowParameter(), and ParameterGrp::SetBool().
Referenced by contextMenuEvent().
|
slot |
Toggles the report to go to the end if new messages appear.
References Gui::WindowParameter::getWindowParameter(), and ParameterGrp::SetBool().
Referenced by contextMenuEvent().
|
slot |
Toggles the report of log messages.
References Base::ILogger::bLog, Gui::WindowParameter::getWindowParameter(), and ParameterGrp::SetBool().
Referenced by contextMenuEvent().
|
slot |
Toggles the report of normal messages.
References Base::ILogger::bMsg, Gui::WindowParameter::getWindowParameter(), and ParameterGrp::SetBool().
Referenced by contextMenuEvent().
|
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().
|
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().
|
slot |
Toggles whether to show report view on errors.
References Gui::ReportOutputParameter::toggleShowOnError().
Referenced by contextMenuEvent().
|
slot |
Toggles whether to show report view on log messages.
References Gui::ReportOutputParameter::toggleShowOnLogMessage().
Referenced by contextMenuEvent().
|
slot |
Toggles whether to show report view on normal messages.
References Gui::ReportOutputParameter::toggleShowOnMessage().
Referenced by contextMenuEvent().
|
slot |
Toggles whether to show report view on warnings.
References Gui::ReportOutputParameter::toggleShowOnWarning().
Referenced by contextMenuEvent().
|
slot |
Toggles the report of warnings.
References Base::ILogger::bWrn, Gui::WindowParameter::getWindowParameter(), and ParameterGrp::SetBool().
Referenced by contextMenuEvent().
void ReportOutput::restoreFont | ( | ) |
Restore the default font settings.
Referenced by ReportOutput().
|
overridevirtual |
Used to send a Log message at the given level.
Implements Base::ILogger.
References Base::Error, Gui::DockWnd::ReportHighlighter::Error, Base::Log, Gui::DockWnd::ReportHighlighter::LogText, Base::Message, Gui::DockWnd::ReportHighlighter::Message, Base::Warning, and Gui::DockWnd::ReportHighlighter::Warning.