-
Notifications
You must be signed in to change notification settings - Fork 2
/
bottombar.h
59 lines (46 loc) · 1.15 KB
/
bottombar.h
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
50
51
52
53
54
55
56
57
58
59
#ifndef BOTTOMBAR_H
#define BOTTOMBAR_H
#include <QWidget>
namespace Ui {
class BottomBar;
}
class CommonTip;
class MyProgressBar;
class BottomBar : public QWidget
{
Q_OBJECT
public:
explicit BottomBar(QWidget *parent = 0);
~BottomBar();
void retranslator();
void refresh();
void updateNumOfConnections(QString result);
protected:
void enterEvent(QEvent* e);
void leaveEvent(QEvent* e);
public slots:
void dynamicShow();
void dynamicHide();
private slots:
void on_signalBtn_clicked();
void ontimerForHideOut();
void onProgressBarValueChanged(int value);
void on_lockBtn_clicked();
void moveEnd();
void getInfo(QString string);
signals:
void showShadowWidget();
void hideShadowWidget();
void lock();
private:
Ui::BottomBar *ui;
int numOfConnections;
CommonTip* connectionTip;
MyProgressBar* myProgressBar;
bool mouseInsideOrNot; // 标志鼠标是否停在bottombar 上
QTimer* timerForHide; // 鼠标离开bottombar两秒后 隐藏
bool isMoving;
void paintEvent(QPaintEvent*);
bool eventFilter(QObject *watched, QEvent *e);
};
#endif // BOTTOMBAR_H