17 #ifndef QGSMESSAGEBAR_H
18 #define QGSMESSAGEBAR_H
159 void pushMessage(
const QString &title,
const QString &text,
const QString &showMore,
Qgis::MessageLevel level =
Qgis::Info,
int duration = 5 );
171 QList<QgsMessageBarItem *> items();
210 void pushSuccess(
const QString &title,
const QString &message );
220 void pushInfo(
const QString &title,
const QString &message );
230 void pushWarning(
const QString &title,
const QString &message );
240 void pushCritical(
const QString &title,
const QString &message );
243 void mousePressEvent( QMouseEvent *e )
override;
249 QList<QgsMessageBarItem *> mItems;
250 QMenu *mCloseMenu =
nullptr;
251 QToolButton *mCloseBtn =
nullptr;
252 QGridLayout *mLayout =
nullptr;
253 QLabel *mItemCount =
nullptr;
254 QAction *mActionCloseAll =
nullptr;
255 QTimer *mCountdownTimer =
nullptr;
256 QProgressBar *mCountProgress =
nullptr;
257 QString mCountStyleSheet;
260 static constexpr
int MAX_ITEMS = 100;
262 void removeLowestPriorityOldestItem();
266 void updateItemCount();
269 void updateCountdown();
270 void resetCountdown();
272 friend class TestQgsMessageBar;