OpenWalnut  1.5.0dev
Public Slots | Public Member Functions | Protected Slots | Private Attributes | List of all members
WQtMessageDock Class Reference

Dock widget for showing messages and logs. More...

#include <WQtMessageDock.h>

+ Inheritance diagram for WQtMessageDock:
+ Collaboration diagram for WQtMessageDock:

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...
 

Detailed Description

Dock widget for showing messages and logs.

Definition at line 40 of file WQtMessageDock.h.

Constructor & Destructor Documentation

◆ WQtMessageDock()

WQtMessageDock::WQtMessageDock ( QString  dockTitle,
QWidget *  parent 
)

Constructor.

Parameters
dockTitlethe title
parentparent 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.

+ Here is the call graph for this function:

◆ ~WQtMessageDock()

WQtMessageDock::~WQtMessageDock ( )
virtual

Destructor.

Definition at line 77 of file WQtMessageDock.cpp.

Member Function Documentation

◆ addLogMessage() [1/2]

void WQtMessageDock::addLogMessage ( const WLogEntry entry)

Add message to the dock.

Parameters
entryuse this log entry

Definition at line 82 of file WQtMessageDock.cpp.

References addLogMessage(), WLogEntry::getLogLevel(), WLogEntry::getMessage(), and WLogEntry::getSource().

+ Here is the call graph for this function:

◆ addLogMessage() [2/2]

void WQtMessageDock::addLogMessage ( QString  sender,
QString  message,
WQtMessagePopup::MessageType  type 
)

Add a message to the dock.

Parameters
senderwho sent the message
messagethe message
typethe type

Definition at line 89 of file WQtMessageDock.cpp.

References addMessage().

Referenced by addLogMessage(), and WMainWindow::event().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addMessage()

void WQtMessageDock::addMessage ( QString  title,
QString  message,
WQtMessagePopup::MessageType  type 
)

Add a message to the dock.

Parameters
titlethe title
messagethe message
typethe 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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clearMessages

void WQtMessageDock::clearMessages ( )
slot

Clear the message list.

Definition at line 148 of file WQtMessageDock.cpp.

References m_logList.

Referenced by WQtMessageDock().

+ Here is the caller graph for this function:

◆ handleFilterUpdate

void WQtMessageDock::handleFilterUpdate ( )
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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveSettings()

void WQtMessageDock::saveSettings ( )
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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_filterCombo

QComboBox* WQtMessageDock::m_filterCombo
private

The message filter.

Definition at line 107 of file WQtMessageDock.h.

Referenced by addMessage(), handleFilterUpdate(), saveSettings(), and WQtMessageDock().

◆ m_logList

QListWidget* WQtMessageDock::m_logList
private

The list.

Definition at line 102 of file WQtMessageDock.h.

Referenced by addMessage(), clearMessages(), handleFilterUpdate(), and WQtMessageDock().


The documentation for this class was generated from the following files: