17 #ifndef QGSMESSAGEBAR_H
18 #define QGSMESSAGEBAR_H
70 QgsMessageBarItem *pushWidget( QWidget *widget, MessageLevel level = INFO,
int duration = 0 );
80 static QgsMessageBarItem* createMessage(
const QString &text, QWidget *parent = 0 );
82 static QgsMessageBarItem* createMessage(
const QString &title,
const QString &text, QWidget *parent = 0 );
89 void pushMessage(
const QString &title,
const QString &text, MessageLevel level = INFO,
int duration = 0 );
116 void pushSuccess(
const QString& title,
const QString& message );
124 void pushInfo(
const QString& title,
const QString& message );
132 void pushWarning(
const QString& title,
const QString& message );
140 void pushCritical(
const QString& title,
const QString& message );
143 void mousePressEvent( QMouseEvent * e )
override;
149 QList<QgsMessageBarItem *> mItems;
151 QToolButton *mCloseBtn;
152 QGridLayout *mLayout;
154 QAction *mActionCloseAll;
155 QTimer *mCountdownTimer;
156 QProgressBar *mCountProgress;
157 QString mCountStyleSheet;
161 void updateItemCount();
164 void updateCountdown();
165 void resetCountdown();