blob: 8edfd03731c314cc543bea02c8a8123248ddbe31 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
#ifndef MO_STATUSBAR_H
#define MO_STATUSBAR_H
#include <QStatusBar>
#include <QProgressBar>
struct APIStats;
class APIUserAccount;
class Settings;
class StatusBarNotifications : public QWidget
{
public:
StatusBarNotifications(QAction* action);
void update(bool hasNotifications);
protected:
void mouseDoubleClickEvent(QMouseEvent* e) override;
private:
QAction* m_action;
QLabel* m_icon;
QLabel* m_text;
};
class StatusBar
{
public:
StatusBar(QStatusBar* bar, QAction* actionNotifications);
void setProgress(int percent);
void updateNotifications(bool hasNotifications);
void updateAPI(const APIStats& stats, const APIUserAccount& user);
void checkSettings(const Settings& settings);
private:
QStatusBar* m_bar;
StatusBarNotifications* m_notifications;
QProgressBar* m_progress;
QLabel* m_api;
};
#endif // MO_STATUSBAR_H
|