forked from RemnantCloude/FlyMessage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
title_bar.h
52 lines (39 loc) · 1.07 KB
/
title_bar.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
#ifndef TITLE_BAR_H
#define TITLE_BAR_H
#include <QWidget>
#include <QMouseEvent>
#include <QPaintEvent>
#include <QString>
#include <QPushButton>
#include <QLabel>
class FlyMessage;
class TitleBar : public QWidget
{
Q_OBJECT
public:
explicit TitleBar(QWidget *parent = nullptr);
~TitleBar();
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
void mouseDoubleClickEvent(QMouseEvent *event);
//TODO:删除后控件会错位
void resizeEvent(QResizeEvent* event);
FlyMessage* thisparent;//父窗口
QPushButton* min_Btn; // 显示最大或者最小的图标
QPushButton* max_Btn; // 最大化按钮
QPushButton* close_Btn;// 关闭按钮
QPushButton* skin_Btn;// 皮肤设置按钮
QLabel* icon_Lab; // 图标
QLabel* title_Lab; // 标题
signals:
void mouseDoubleClick(bool);
private slots:
void onSkin(bool);//TODO:
private:
protected:
void initComponents();
void initSignalAndSlot();
void setThisLayout();
void setThisStyle();
};
#endif // TITLE_BAR_H