OpenWalnut
1.5.0dev
|
Dock widget for showing messages and logs. More...
#include <WQtMessageDock.h>
Public Slots | |
void | clearMessages () |
Clear the message list. More... | |
Public Slots inherited from WQtDockWidget | |
void | showHelp () |
Show help. More... | |
Public Member Functions | |
WQtMessageDock (QString dockTitle, QWidget *parent) | |
Constructor. More... | |
virtual | ~WQtMessageDock () |
Destructor. More... | |
void | addMessage (QString title, QString message, WQtMessagePopup::MessageType type) |
Add a message to the dock. More... | |
void | addLogMessage (QString sender, QString message, WQtMessagePopup::MessageType type) |
Add a message to the dock. More... | |
void | addLogMessage (const WLogEntry &entry) |
Add message to the dock. More... | |
void | saveSettings () |
Save state to settings. More... | |
Public Member Functions inherited from WQtDockWidget | |
WQtDockWidget (const QString &title, QWidget *parent=0, Qt::WindowFlags flags=Qt::WindowFlags()) | |
Construct dock widget with title. More... | |
WQtDockWidget (QWidget *parent=0, Qt::WindowFlags flags=Qt::WindowFlags()) | |
Construct dock widget. More... | |
virtual | ~WQtDockWidget () |
Destructor. More... | |
virtual void | addTitleProperty (WPropTrigger prop, WGEImage::SPtr icon=WGEImage::SPtr()) |
Add a property to the title of this dock. More... | |
virtual void | addTitleProperty (WPropBool prop, WGEImage::SPtr icon=WGEImage::SPtr()) |
Add a property to the title of this dock. More... | |
virtual void | addTitleProperty (WPropGroup prop, WGEImage::SPtr icon=WGEImage::SPtr()) |
Add a property to the title of this dock. More... | |
virtual void | addTitleAction (QAction *action, bool instantPopup=false) |
Add the given action to the titlebar. More... | |
virtual void | addTitleButton (QToolButton *button) |
Add the given tool button to the titlebar. More... | |
virtual void | removeTitleAction (QAction *action) |
Remove the given action from the list. More... | |
virtual void | addTitleSeperator () |
Add a separator. More... | |
virtual void | addTitleWidget (QWidget *widget) |
Add an arbitrary widget. More... | |
virtual void | removeTitleWidget (QWidget *widget) |
Remove the specified widget from the title bar. More... | |
virtual void | setHelpContext (const QString &id) |
Set a string which identifies help material for this dock. More... | |
virtual const QString & | getHelpContext () |
Return the help context id. More... | |
virtual void | restoreSettings () |
Restore settings. More... | |
void | disableCloseButton (bool disable=true) |
Disable close button? Might come in handy when embedding these widgets into others. More... | |
Protected Slots | |
void | handleFilterUpdate () |
Handles changes in the filter combo. More... | |
Private Attributes | |
QListWidget * | m_logList |
The list. More... | |
QComboBox * | m_filterCombo |
The message filter. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from WQtDockWidget | |
virtual void | closeEvent (QCloseEvent *event) |
Called whenever a close event is received. More... | |
Dock widget for showing messages and logs.
Definition at line 40 of file WQtMessageDock.h.
WQtMessageDock::WQtMessageDock | ( | QString | dockTitle, |
QWidget * | parent | ||
) |
Constructor.
dockTitle | the title |
parent | parent widget |
Definition at line 43 of file WQtMessageDock.cpp.
References WQtDockWidget::addTitleAction(), WQtDockWidget::addTitleWidget(), clearMessages(), WQtGui::getMainWindow(), WMainWindow::getSettings(), handleFilterUpdate(), m_filterCombo, and m_logList.
|
virtual |
Destructor.
Definition at line 77 of file WQtMessageDock.cpp.
void WQtMessageDock::addLogMessage | ( | const WLogEntry & | entry | ) |
Add message to the dock.
entry | use this log entry |
Definition at line 82 of file WQtMessageDock.cpp.
References addLogMessage(), WLogEntry::getLogLevel(), WLogEntry::getMessage(), and WLogEntry::getSource().
void WQtMessageDock::addLogMessage | ( | QString | sender, |
QString | message, | ||
WQtMessagePopup::MessageType | type | ||
) |
Add a message to the dock.
sender | who sent the message |
message | the message |
type | the type |
Definition at line 89 of file WQtMessageDock.cpp.
References addMessage().
Referenced by addLogMessage(), and WMainWindow::event().
void WQtMessageDock::addMessage | ( | QString | title, |
QString | message, | ||
WQtMessagePopup::MessageType | type | ||
) |
Add a message to the dock.
title | the title |
message | the message |
type | the type |
Definition at line 94 of file WQtMessageDock.cpp.
References m_filterCombo, m_logList, WQtMessagePopup::setAutoClose(), WQtMessagePopup::setAutoPosition(), and WQtMessagePopup::setShowCloseButton().
Referenced by addLogMessage(), WMainWindow::reportError(), WMainWindow::reportInfo(), and WMainWindow::reportWarning().
|
slot |
Clear the message list.
Definition at line 148 of file WQtMessageDock.cpp.
References m_logList.
Referenced by WQtMessageDock().
|
protectedslot |
Handles changes in the filter combo.
Definition at line 134 of file WQtMessageDock.cpp.
References WQtMessagePopup::getType(), m_filterCombo, and m_logList.
Referenced by WQtMessageDock().
|
virtual |
Save state to settings.
Reimplemented from WQtDockWidget.
Definition at line 129 of file WQtMessageDock.cpp.
References WMainWindow::getSettings(), and m_filterCombo.
Referenced by WMainWindow::saveWindowState().
|
private |
The message filter.
Definition at line 107 of file WQtMessageDock.h.
Referenced by addMessage(), handleFilterUpdate(), saveSettings(), and WQtMessageDock().
|
private |
The list.
Definition at line 102 of file WQtMessageDock.h.
Referenced by addMessage(), clearMessages(), handleFilterUpdate(), and WQtMessageDock().