| 1 | // For license of this file, see <project-root-folder>/LICENSE.md. |
| 2 | |
| 3 | #ifndef STATUSBAR_H |
| 4 | #define STATUSBAR_H |
| 5 | |
| 6 | #include "gui/toolbars/basetoolbar.h" |
| 7 | |
| 8 | #include <QStatusBar> |
| 9 | |
| 10 | class ProgressBarWithText; |
| 11 | class QLabel; |
| 12 | class PlainToolButton; |
| 13 | |
| 14 | class StatusBar : public QStatusBar, public BaseBar { |
| 15 | Q_OBJECT |
| 16 | |
| 17 | public: |
| 18 | explicit StatusBar(QWidget* parent = nullptr); |
| 19 | virtual ~StatusBar(); |
| 20 | |
| 21 | virtual QList<QAction*> availableActions() const; |
| 22 | virtual QList<QAction*> activatedActions() const; |
| 23 | virtual void saveAndSetActions(const QStringList& actions); |
| 24 | virtual QStringList defaultActions() const; |
| 25 | virtual QStringList savedActions() const; |
| 26 | virtual QList<QAction*> convertActions(const QStringList& actions); |
| 27 | virtual void loadSpecificActions(const QList<QAction*>& actions, bool initial_load = false); |
| 28 | |
| 29 | public slots: |
| 30 | void showProgressFeeds(int progress, const QString& label); |
| 31 | void clearProgressFeeds(); |
| 32 | |
| 33 | void showProgressDownload(int progress, const QString& tooltip); |
| 34 | void clearProgressDownload(); |
| 35 | |
| 36 | protected: |
| 37 | bool eventFilter(QObject* watched, QEvent* event); |
| 38 | |
| 39 | private: |
| 40 | void clear(); |
| 41 | |
| 42 | ProgressBarWithText* m_barProgressFeeds; |
| 43 | QAction* m_barProgressFeedsAction; |
| 44 | ProgressBarWithText* m_barProgressDownload; |
| 45 | QAction* m_barProgressDownloadAction; |
| 46 | }; |
| 47 | |
| 48 | #endif // STATUSBAR_H |