A bar for displaying non-blocking messages to the user.
More...
#include <qgsmessagebar.h>
Public Slots |
bool | clearWidgets () |
bool | popWidget () |
void | pushCritical (const QString &title, const QString &message) |
| Pushes a warning with default timeout to the message bar.
|
void | pushInfo (const QString &title, const QString &message) |
| Pushes a warning with default timeout to the message bar.
|
void | pushSuccess (const QString &title, const QString &message) |
| Pushes a warning with default timeout to the message bar.
|
void | pushWarning (const QString &title, const QString &message) |
| Pushes a warning with default timeout to the message bar.
|
Static Public Member Functions |
static QgsMessageBarItem * | createMessage (const QString &text, QWidget *parent=0) |
| make out a widget containing a message to be displayed on the bar
|
static QgsMessageBarItem * | createMessage (const QString &title, const QString &text, QWidget *parent=0) |
| make out a widget containing title and message to be displayed on the bar
|
static QgsMessageBarItem * | createMessage (QWidget *widget, QWidget *parent=0) |
| make out a widget containing title and message to be displayed on the bar
|
Detailed Description
A bar for displaying non-blocking messages to the user.
Definition at line 42 of file qgsmessagebar.h.
Member Enumeration Documentation
- Enumerator:
INFO |
|
WARNING |
|
CRITICAL |
|
SUCCESS |
|
Definition at line 47 of file qgsmessagebar.h.
Constructor & Destructor Documentation
QgsMessageBar::QgsMessageBar |
( |
QWidget * |
parent = 0 | ) |
|
QgsMessageBar::~QgsMessageBar |
( |
| ) |
|
Member Function Documentation
bool QgsMessageBar::clearWidgets |
( |
| ) |
|
|
slot |
remove all items from the bar's widget list
- Returns
- true if all items were removed, false otherwise
Definition at line 195 of file qgsmessagebar.cpp.
QgsMessageBarItem * QgsMessageBar::createMessage |
( |
const QString & |
text, |
|
|
QWidget * |
parent = 0 |
|
) |
| |
|
static |
make out a widget containing a message to be displayed on the bar
Definition at line 298 of file qgsmessagebar.cpp.
QgsMessageBarItem * QgsMessageBar::createMessage |
( |
const QString & |
title, |
|
|
const QString & |
text, |
|
|
QWidget * |
parent = 0 |
|
) |
| |
|
static |
make out a widget containing title and message to be displayed on the bar
Definition at line 304 of file qgsmessagebar.cpp.
QgsMessageBarItem * QgsMessageBar::createMessage |
( |
QWidget * |
widget, |
|
|
QWidget * |
parent = 0 |
|
) |
| |
|
static |
make out a widget containing title and message to be displayed on the bar
Definition at line 309 of file qgsmessagebar.cpp.
void QgsMessageBar::mousePressEvent |
( |
QMouseEvent * |
e | ) |
|
|
overrideprotected |
remove the passed widget from the bar (if previously added), then display the next one in the stack if any or hide the bar
- Parameters
-
- Returns
- true if the widget was removed, false otherwise
Definition at line 158 of file qgsmessagebar.cpp.
bool QgsMessageBar::popWidget |
( |
| ) |
|
|
slot |
remove the currently displayed widget from the bar and display the next in the stack if any or hide the bar
- Returns
- true if the widget was removed, false otherwise
Definition at line 182 of file qgsmessagebar.cpp.
void QgsMessageBar::pushCritical |
( |
const QString & |
title, |
|
|
const QString & |
message |
|
) |
| |
|
slot |
Pushes a warning with default timeout to the message bar.
- Parameters
-
title | title string for message |
message | The message to be displayed |
- Note
- added in 2.8
Definition at line 224 of file qgsmessagebar.cpp.
void QgsMessageBar::pushInfo |
( |
const QString & |
title, |
|
|
const QString & |
message |
|
) |
| |
|
slot |
Pushes a warning with default timeout to the message bar.
- Parameters
-
title | title string for message |
message | The message to be displayed |
- Note
- added in 2.8
Definition at line 214 of file qgsmessagebar.cpp.
display a message item on the bar after hiding the currently visible one and putting it in a stack.
- Parameters
-
Definition at line 268 of file qgsmessagebar.cpp.
void QgsMessageBar::pushMessage |
( |
const QString & |
text, |
|
|
MessageLevel |
level = INFO , |
|
|
int |
duration = 0 |
|
) |
| |
|
inline |
convenience method for pushing a message to the bar
Definition at line 87 of file qgsmessagebar.h.
convenience method for pushing a message with title to the bar
Definition at line 292 of file qgsmessagebar.cpp.
void QgsMessageBar::pushSuccess |
( |
const QString & |
title, |
|
|
const QString & |
message |
|
) |
| |
|
slot |
Pushes a warning with default timeout to the message bar.
- Parameters
-
title | title string for message |
message | The message to be displayed |
- Note
- added in 2.8
Definition at line 209 of file qgsmessagebar.cpp.
void QgsMessageBar::pushWarning |
( |
const QString & |
title, |
|
|
const QString & |
message |
|
) |
| |
|
slot |
Pushes a warning with default timeout to the message bar.
- Parameters
-
title | title string for message |
message | The message to be displayed |
- Note
- added in 2.8
Definition at line 219 of file qgsmessagebar.cpp.
display a widget as a message on the bar after hiding the currently visible one and putting it in a stack.
- Parameters
-
widget | message widget to display |
level | is QgsMessageBar::INFO, WARNING, CRITICAL or SUCCESS |
duration | timeout duration of message in seconds, 0 value indicates no timeout |
Definition at line 276 of file qgsmessagebar.cpp.
emitted when a message widget is added to the bar
emitted when a message widget was removed from the bar
The documentation for this class was generated from the following files: