-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathstatusbarchanger.h
More file actions
49 lines (45 loc) · 1.39 KB
/
statusbarchanger.h
File metadata and controls
49 lines (45 loc) · 1.39 KB
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
47
48
49
#ifndef STATUSBARCHANGER_H
#define STATUSBARCHANGER_H
#include <QEvent>
#include <QMultiMap>
#include <QStatusBar>
#include "utilsexport.h"
#define SBG_NULL -1
#define SBG_DEFAULT 500
class UTILS_EXPORT StatusBarChanger :
public QObject
{
Q_OBJECT;
public:
StatusBarChanger(QStatusBar *AStatusBar);
~StatusBarChanger();
bool isEmpty() const;
bool manageVisibitily() const;
void setManageVisibility(bool AManageVisibility);
QStatusBar *statusBar() const;
int widgetGroup(QWidget *AWidget) const;
QList<QWidget *> groupWidgets(int AGroup = SBG_NULL) const;
void insertWidget(QWidget *AWidget, int AGroup = SBG_DEFAULT, bool APermanent = false, int AStretch = 0);
void removeWidget(QWidget *AWidget);
void clear();
signals:
void widgetInserted(QWidget *ABefour, QWidget *AWidget, int AGroup, bool APermanent, int AStretch);
void widgetRemoved(QWidget *AWidget);
void statusBarChangerDestroyed(StatusBarChanger *AStatusBarChanger);
protected slots:
void updateVisible();
protected:
virtual bool eventFilter(QObject *AObject, QEvent *AEvent);
protected slots:
void onWidgetDestroyed(QObject *AObject);
void onChangeVisible();
private:
bool FIntVisible;
bool FExtVisible;
bool FManageVisibility;
int FChangingIntVisible;
bool FVisibleTimerStarted;
QStatusBar *FStatusBar;
QMultiMap<int, QWidget *> FWidgets;
};
#endif // STATUSBARCHANGER_H