LibEngsas
|
Creates a QDockWidget and collects all errors, warnings and information. More...
#include <elogobject.h>
Signals | |
void | addMessage (QtMsgType type, const QString msg) |
![]() | |
void | error (const QString &message) |
void | warning (const QString &message) |
void | information (const QString &message) |
void | reloadEnableActions () |
Request reloading of enabled actions in EMainWindow. | |
void | addMenu (QMenu *newMenu, const QString &parent, QString before=QString()) |
void | addAction (QAction *newAction, const QString &parent, QString before=QString()) |
void | addToolBar (QToolBar *newToolBar, Qt::ToolBarArea area=Qt::TopToolBarArea) |
void | addNewDockWidget (QDockWidget *widget, const Qt::DockWidgetArea &area) |
void | setCentralWidget (QWidget *centralWidget) |
void | showSettings () |
void | showHelp (const QString &page) |
void | showStatusWidget (QWidget *widget) |
void | reloadSettingsRequest () |
Indicates, that a reload of the settings is needed. | |
void | doReloadSettings () |
Emitted to bring the reload request back to the farest child. |
Public Member Functions | |
ELogObject (bool installMessageHandler, QObject *parent=NULL) | |
~ELogObject () | |
void | init (QString filePath=QString()) |
Set's up the log object. | |
void | setup (EObject *object) |
void | setup (EWidget *object) |
![]() | |
EObject (QObject *parent=0) | |
virtual | ~EObject () |
void | connectByPass (QObject *object) |
Static Public Member Functions | |
static void | messageHandler (QtMsgType type, const char *msg) |
Used to fetch the messages of qDebug(), qWarning(), qCritical() and qFatal(). | |
![]() | |
static void | connectByPass (QObject *parent, QObject *child) |
Private Member Functions | |
void | populateMessage (QtMsgType type, const QString msg) |
Private Attributes | |
ELogObjectPrivate * | logger |
bool | installedAsMessageHandler |
Static Private Attributes | |
static ELogObject * | self = NULL |
Additional Inherited Members | |
![]() | |
virtual void | reloadSettings () |
Used to reload the settings. | |
![]() | |
virtual void | errorByPass (const QString &message) |
virtual void | warningByPass (const QString &message) |
virtual void | informationByPass (const QString &message) |
virtual void | reloadEnableActionsByPass () |
virtual void | addMenuByPass (QMenu *newMenu, const QString &parent, QString before=QString()) |
virtual void | addActionByPass (QAction *newAction, const QString &parent, QString before=QString()) |
virtual void | addToolBarByPass (QToolBar *newToolBar, Qt::ToolBarArea area=Qt::TopToolBarArea) |
virtual void | addNewDockWidgetByPass (QDockWidget *widget, const Qt::DockWidgetArea &area) |
virtual void | setCentralWidgetByPass (QWidget *centralWidget) |
virtual void | showSettingsByPass () |
virtual void | showHelpByPass (const QString &page) |
virtual void | showStatusWidgetByPass (QWidget *widget) |
virtual void | reloadSettingsRequestByPass () |
![]() | |
void | addManagedDockWidget (QDockWidget *widget, const Qt::DockWidgetArea &area, QString actionLabel=QString(), QString actionParent=QString()) |
Adds an dock widget via addNewDockWidget() and adds widget to the list of managed dock widgets. |
Creates a QDockWidget and collects all errors, warnings and information.
The object, where the warnings, errors and information are collected from, can be set with setup(EObject*) or setup(EWidget*). If you want to catch all qDebug(), qWarning(), qCritical() and qFatal() outputs, call ELogObject() with first argument set to true, to install this object as a message handler.
To log to a file instead of the log widget, specify the file path as first parameter of init().
ELogObject::ELogObject | ( | bool | installMessageHandler, |
QObject * | parent = NULL |
||
) |
ELogObject::~ELogObject | ( | ) |
|
signal |
void ELogObject::init | ( | QString | filePath = QString() | ) |
Set's up the log object.
To log to a file, specifiy the log file file path with filePath
. If empty, it is logged to a QTextEdit in an QDockWidget.
|
static |
Used to fetch the messages of qDebug(), qWarning(), qCritical() and qFatal().
To install it, just call ELogObject() with first argument set to true.
|
private |
void ELogObject::setup | ( | EObject * | object | ) |
void ELogObject::setup | ( | EWidget * | object | ) |
|
private |
|
private |
|
staticprivate |