-
Notifications
You must be signed in to change notification settings - Fork 0
/
customizewin.h
50 lines (38 loc) · 963 Bytes
/
customizewin.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
#ifndef CUSTOMIZEWIN_H
#define CUSTOMIZEWIN_H
#include <QWidget>
#include <QMouseEvent>
#include <QContextMenuEvent>
#include <QMenu>
#include <QEvent>
#include "home.h"
#define SCREEN_WIDTH 1440
#define SCREEN_HIGH 900
namespace Ui {
class CustomizeWin;
}
class CustomizeWin : public QWidget
{
Q_OBJECT
public:
explicit CustomizeWin(QWidget *parent = 0);
~CustomizeWin();
protected:
void mousePressEvent(QMouseEvent *); // 鼠标点击
void mouseMoveEvent(QMouseEvent *); // 鼠标移动
void mouseReleaseEvent(QMouseEvent *); // 鼠标释放
void moveEvent(QMoveEvent *);
void paintEvent(QPaintEvent *);
private slots:
void on_btnExit_clicked();
void on_action_minimum_triggered();
void on_action_resize_triggered();
void on_action_maximum_triggered();
private:
Ui::CustomizeWin *ui;
QPoint prevPos;
QPoint distence;
Home* ho = NULL;
QMenu *menuRight;
};
#endif // CUSTOMIZEWIN_H