![]() |
OpenWalnut
1.5.0dev
|
Nice looking message popup. More...
#include <WQtMessagePopup.h>
Inheritance diagram for WQtMessagePopup:
Collaboration diagram for WQtMessagePopup:Public Types | |
| typedef LogLevel | MessageType |
| Describe the kind of message. More... | |
Public Slots | |
| void | showMessage () |
| Shows the message. More... | |
| void | closePopup () |
| Cloes this popup. More... | |
Signals | |
| void | onClose (WQtMessagePopup *me) |
| Called when closing the popup. More... | |
Public Member Functions | |
| WQtMessagePopup (QWidget *parent, const QString &title, const QString &message, MessageType type) | |
| Constructor. More... | |
| virtual | ~WQtMessagePopup () |
| Destructor. More... | |
| void | setAutoClose (bool autoClose=true) |
| When set to true, the widget gets closed when loosing focus or when clicking the detail button. More... | |
| void | setShowCloseButton (bool showCloseButton=true) |
| Show or hide the close button. More... | |
| void | setAutoPosition (bool autoPosition=true) |
| If true, the widget moves itself to the bottom of its parent widget. More... | |
| MessageType | getType () const |
| Get this popups message type. More... | |
| void | show () |
| Reimplement show from QWidget to be able to auto-close it. More... | |
Protected Member Functions | |
| virtual void | showEvent (QShowEvent *event) |
| On show. More... | |
Private Attributes | |
| QString | m_title |
| Title Text. More... | |
| QString | m_message |
| The message text. More... | |
| MessageType | m_type |
| What kind of message is this. More... | |
| QPushButton * | m_closeBtn |
| Close button. More... | |
| bool | m_autoClose |
| See setAutoClose. More... | |
| bool | m_autoMove |
| See setAutoPosition. More... | |
Nice looking message popup.
Definition at line 38 of file WQtMessagePopup.h.
| typedef LogLevel WQtMessagePopup::MessageType |
Describe the kind of message.
Definition at line 45 of file WQtMessagePopup.h.
| WQtMessagePopup::WQtMessagePopup | ( | QWidget * | parent, |
| const QString & | title, | ||
| const QString & | message, | ||
| MessageType | type | ||
| ) |
Constructor.
| parent | parent widget |
| title | title |
| message | message |
| type | the message type |
Definition at line 49 of file WQtMessagePopup.cpp.
References closePopup(), WQtGui::getMainWindow(), m_closeBtn, m_type, setAutoClose(), WScaleLabel::setText(), and showMessage().
Here is the call graph for this function:
|
virtual |
Destructor.
Definition at line 203 of file WQtMessagePopup.cpp.
|
slot |
Cloes this popup.
Use instead of close() slot.
Definition at line 251 of file WQtMessagePopup.cpp.
References onClose().
Referenced by showMessage(), and WQtMessagePopup().
Here is the caller graph for this function:| WQtMessagePopup::MessageType WQtMessagePopup::getType | ( | ) | const |
Get this popups message type.
Definition at line 267 of file WQtMessagePopup.cpp.
References m_type.
Referenced by WQtMessageDock::handleFilterUpdate().
Here is the caller graph for this function:
|
signal |
Called when closing the popup.
| me | the pointer to the widget getting close |
Referenced by closePopup().
Here is the caller graph for this function:| void WQtMessagePopup::setAutoClose | ( | bool | autoClose = true | ) |
When set to true, the widget gets closed when loosing focus or when clicking the detail button.
If not, the widget needs to be closed manually.
| autoClose | close flag |
Definition at line 236 of file WQtMessagePopup.cpp.
References m_autoClose.
Referenced by WQtMessageDock::addMessage(), and WQtMessagePopup().
Here is the caller graph for this function:| void WQtMessagePopup::setAutoPosition | ( | bool | autoPosition = true | ) |
If true, the widget moves itself to the bottom of its parent widget.
As this is not useful sometimes, you can disable this by using false here.
| autoPosition | false if widget should not move automatically |
Definition at line 262 of file WQtMessagePopup.cpp.
References m_autoMove.
Referenced by WQtMessageDock::addMessage().
Here is the caller graph for this function:| void WQtMessagePopup::setShowCloseButton | ( | bool | showCloseButton = true | ) |
Show or hide the close button.
| showCloseButton | true to show |
Definition at line 257 of file WQtMessagePopup.cpp.
References m_closeBtn.
Referenced by WQtMessageDock::addMessage().
Here is the caller graph for this function:| void WQtMessagePopup::show | ( | ) |
Reimplement show from QWidget to be able to auto-close it.
Definition at line 230 of file WQtMessagePopup.cpp.
Referenced by WMainWindow::reportError(), WMainWindow::reportInfo(), and WMainWindow::reportWarning().
Here is the caller graph for this function:
|
protectedvirtual |
On show.
Called when opening the widget.
| event |
Definition at line 188 of file WQtMessagePopup.cpp.
References m_autoMove.
|
slot |
Shows the message.
Definition at line 208 of file WQtMessagePopup.cpp.
References closePopup(), m_autoClose, m_message, m_title, and m_type.
Referenced by WQtMessagePopup().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
See setAutoClose.
Definition at line 146 of file WQtMessagePopup.h.
Referenced by setAutoClose(), and showMessage().
|
private |
See setAutoPosition.
Definition at line 151 of file WQtMessagePopup.h.
Referenced by setAutoPosition(), and showEvent().
|
private |
Close button.
Definition at line 141 of file WQtMessagePopup.h.
Referenced by setShowCloseButton(), and WQtMessagePopup().
|
private |
|
private |
|
private |
What kind of message is this.
Definition at line 136 of file WQtMessagePopup.h.
Referenced by getType(), showMessage(), and WQtMessagePopup().