A bar for displaying non-blocking messages to the user.
More...
#include <qgsmessagebar.h>
|
bool | clearWidgets () |
| Remove all items from the bar's widget list. More...
|
|
bool | popWidget () |
| Remove the currently displayed widget from the bar and display the next in the stack if any or hide the bar. More...
|
|
void | pushCritical (const QString &title, const QString &message) |
| Pushes a critical warning with default timeout to the message bar. More...
|
|
void | pushInfo (const QString &title, const QString &message) |
| Pushes a information message with default timeout to the message bar. More...
|
|
void | pushSuccess (const QString &title, const QString &message) |
| Pushes a success message with default timeout to the message bar. More...
|
|
void | pushWarning (const QString &title, const QString &message) |
| Pushes a warning with default timeout to the message bar. More...
|
|
|
| QgsMessageBar (QWidget *parent=nullptr) |
| Constructor for QgsMessageBar. More...
|
|
QgsMessageBarItem * | currentItem () |
|
bool | popWidget (QgsMessageBarItem *item) |
| Remove the passed widget from the bar (if previously added), then display the next one in the stack if any or hide the bar. More...
|
|
void | pushItem (QgsMessageBarItem *item) |
| Display a message item on the bar after hiding the currently visible one and putting it in a stack. More...
|
|
void | pushMessage (const QString &text, Qgis::MessageLevel level=Qgis::Info, int duration=5) |
| convenience method for pushing a message to the bar More...
|
|
void | pushMessage (const QString &title, const QString &text, Qgis::MessageLevel level=Qgis::Info, int duration=5) |
| convenience method for pushing a message with title to the bar More...
|
|
void | pushMessage (const QString &title, const QString &text, const QString &showMore, Qgis::MessageLevel level=Qgis::Info, int duration=5) |
| convenience method for pushing a message to the bar with a detail text which be shown when pressing a "more" button More...
|
|
QgsMessageBarItem * | pushWidget (QWidget *widget, Qgis::MessageLevel level=Qgis::Info, int duration=0) |
| Display a widget as a message on the bar after hiding the currently visible one and putting it in a stack. More...
|
|
A bar for displaying non-blocking messages to the user.
Definition at line 45 of file qgsmessagebar.h.
QgsMessageBar::QgsMessageBar |
( |
QWidget * |
parent = nullptr | ) |
|
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 200 of file qgsmessagebar.cpp.
QgsMessageBarItem * QgsMessageBar::createMessage |
( |
const QString & |
text, |
|
|
QWidget * |
parent = nullptr |
|
) |
| |
|
static |
make out a widget containing a message to be displayed on the bar
Definition at line 348 of file qgsmessagebar.cpp.
QgsMessageBarItem * QgsMessageBar::createMessage |
( |
const QString & |
title, |
|
|
const QString & |
text, |
|
|
QWidget * |
parent = nullptr |
|
) |
| |
|
static |
make out a widget containing title and message to be displayed on the bar
Definition at line 354 of file qgsmessagebar.cpp.
QgsMessageBarItem * QgsMessageBar::createMessage |
( |
QWidget * |
widget, |
|
|
QWidget * |
parent = nullptr |
|
) |
| |
|
static |
make out a widget containing title and message to be displayed on the bar
Definition at line 359 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 163 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 187 of file qgsmessagebar.cpp.
void QgsMessageBar::pushCritical |
( |
const QString & |
title, |
|
|
const QString & |
message |
|
) |
| |
|
slot |
Pushes a critical warning with default timeout to the message bar.
- Parameters
-
title | title string for message |
message | The message to be displayed |
- Since
- QGIS 2.8
Definition at line 229 of file qgsmessagebar.cpp.
void QgsMessageBar::pushInfo |
( |
const QString & |
title, |
|
|
const QString & |
message |
|
) |
| |
|
slot |
Pushes a information message with default timeout to the message bar.
- Parameters
-
title | title string for message |
message | The message to be displayed |
- Since
- QGIS 2.8
Definition at line 219 of file qgsmessagebar.cpp.
Display a message item on the bar after hiding the currently visible one and putting it in a stack.
The message bar will take ownership of the item.
- Parameters
-
Definition at line 273 of file qgsmessagebar.cpp.
convenience method for pushing a message to the bar
Definition at line 88 of file qgsmessagebar.h.
convenience method for pushing a message with title to the bar
Definition at line 305 of file qgsmessagebar.cpp.
void QgsMessageBar::pushMessage |
( |
const QString & |
title, |
|
|
const QString & |
text, |
|
|
const QString & |
showMore, |
|
|
Qgis::MessageLevel |
level = Qgis::Info , |
|
|
int |
duration = 5 |
|
) |
| |
convenience method for pushing a message to the bar with a detail text which be shown when pressing a "more" button
Definition at line 322 of file qgsmessagebar.cpp.
void QgsMessageBar::pushSuccess |
( |
const QString & |
title, |
|
|
const QString & |
message |
|
) |
| |
|
slot |
Pushes a success message with default timeout to the message bar.
- Parameters
-
title | title string for message |
message | The message to be displayed |
- Since
- QGIS 2.8
Definition at line 214 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 |
- Since
- QGIS 2.8
Definition at line 224 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 Qgis::Info, Warning, Critical or Success |
duration | timeout duration of message in seconds, 0 value indicates no timeout |
Definition at line 289 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: