A logger engine which shows logged messages in a widget with a QPlainTextEdit widget. More...
#include <WidgetLoggerEngine.h>
Public Types | |
enum | MessageDisplays { NoMessageDisplays = 0, AllMessagesPlainTextEdit = 1, IssuesPlainTextEdit = 2, WarningsPlainTextEdit = 4, ErrorsPlainTextEdit = 8 } |
This enumeration provides the possible ways that messages can be displayed in the WidgetLoggerEngineFrontend used by this engine. More... |
Public Slots | |
void | clearLog () |
Clears the log currently hold by the logger engine. | |
void | logMessage (const QString &message, Logger::MessageType message_type) |
Function which receives a formatted string which needs to be logged. | |
Public Slots inherited from Qtilities::Logging::AbstractLoggerEngine | |
virtual void | newMessages (const QString &engine_name, Logger::MessageType message_type, Logger::MessageContextFlags message_context, const QList< QVariant > &messages) |
Slot which is connected to the newMessage() signal of the Logger class. |
Public Member Functions | |
QString | description () const |
Returns a description of the engine. | |
void | finalize () |
Function which is called to finalize the logger engine. | |
bool | initialize () |
Function which is called to initialize the logger engine. | |
bool | isFormattingEngineConstant () const |
Indicates if the formatting engine and/or the message contexts can be changed by the user at runtime. | |
bool | isInitialized () const |
Returns true if the engine is initialized. | |
QPlainTextEdit * | plainTextEdit (MessageDisplaysFlag message_display) const |
Returns the QPlainTextEdit used by this widget logger engine. Through this reference you can add your own custom syntax highligter etc. | |
void | setWindowTitle (const QString &window_title) |
Sets the window title used for this logger engine. | |
QString | status () const |
Returns a status message for the engine. | |
QString | windowTitle () const |
Gets the window title used for this logger engine. | |
Public Member Functions inherited from Qtilities::Logging::AbstractLoggerEngine | |
virtual void | enableAllMessageTypes () |
Enables all message types for this engine. | |
QString | formattingEngineName () |
Returns the name of the installed formatting engine. | |
Logger::MessageTypeFlags | getEnabledMessageTypes () const |
Returns the enabled message types for this engine. | |
AbstractFormattingEngine * | getInstalledFormattingEngine () |
Returns a reference to the formatting engine used by this engine. | |
void | installFormattingEngine (AbstractFormattingEngine *engine) |
Installs a formatting engine which needs to be used by this engine. | |
bool | isActive () const |
Indicates if the engine is active. | |
Logger::MessageContextFlags | messageContexts () const |
Returns the logging contexts for which this engine accepts messages. | |
QString | name () const |
Returns the name of the engine. | |
virtual bool | removable () const |
Gets if the user can remove this engine. | |
void | setActive (bool is_active) |
Sets the activity of the engine. | |
virtual void | setEnabledMessageTypes (Logger::MessageTypeFlags message_types) |
Sets the enabled message types for this engine. | |
void | setMessageContexts (Logger::MessageContextFlags message_contexts) |
Sets the logging contexts for which this engine accepts messages. | |
void | setName (const QString &name) |
Sets the name of the engine. | |
virtual void | setRemovable (bool is_removable) |
Sets if the user can remove this engine. |
A logger engine which shows logged messages in a widget with a QPlainTextEdit widget.
A logger engine which shows logged messages in a widget with a QPlainTextEdit widget.
This enumeration provides the possible ways that messages can be displayed in the WidgetLoggerEngineFrontend used by this engine.
The default is DefaultDisplays.
|
virtualslot |
Clears the log currently hold by the logger engine.
Reimplemented from Qtilities::Logging::AbstractLoggerEngine.
|
virtualslot |
Function which receives a formatted string which needs to be logged.
Messages arrives at logger engines through the newMessages() slot which will format the messages and validate if they must be logged. If so, this function will be called with a formatted message. If you wish to handle the message formatting manually, you can reimplement the newMessages() function.
Implements Qtilities::Logging::AbstractLoggerEngine.
QPlainTextEdit * Qtilities::CoreGui::WidgetLoggerEngine::plainTextEdit | ( | MessageDisplaysFlag | message_display | ) | const |
Returns the QPlainTextEdit used by this widget logger engine. Through this reference you can add your own custom syntax highligter etc.
void Qtilities::CoreGui::WidgetLoggerEngine::setWindowTitle | ( | const QString & | window_title | ) |
Sets the window title used for this logger engine.
QString Qtilities::CoreGui::WidgetLoggerEngine::windowTitle | ( | ) | const |
Gets the window title used for this logger engine.
Qtilities : Reference Documentation | Back to top |
Copyright © 2009-2013, Jaco Naudé
|