forked from Blackmamba-xuan/QtQQ
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtalk.h
75 lines (68 loc) · 1.64 KB
/
talk.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#ifndef TALK_H
#define TALK_H
#include <QWidget>
#include<QLabel>
#include<QMovie>
#include<QMouseEvent>
#include<QDebug>
#include<QPropertyAnimation>
#include<QImage>
#include<QDesktopServices>
#include<QPropertyAnimation>
#include<QPainter>
#include<QRect>
#include "qmath.h"
#include<QStackedLayout>
#include<QRect>
#include<QDesktopWidget>
#include<QHideEvent>
#include<QSystemTrayIcon>
#include<QTimer>
#include "one.h"
#include "two.h"
#include "drawer.h"
#include "search.h"
#include<QTcpSocket>
namespace Ui {
class Talk;
}
class Talk : public QWidget
{
Q_OBJECT
public:
explicit Talk(QWidget *parent = 0);
~Talk();
QPoint move_point; //移动的距离
bool mouse_press; //鼠标按下
//鼠标按下事件
void mousePressEvent(QMouseEvent *event);
//鼠标释放事件
void mouseReleaseEvent(QMouseEvent *event);
//鼠标移动事件
void mouseMoveEvent(QMouseEvent *event);
//最小化及关闭
bool eventFilter(QObject *object, QEvent *e);
void paintEvent(QPaintEvent *event);
void hideEvent(QHideEvent *event);
void init(QByteArray byte_array);
private:
Ui::Talk *ui;
int i;
QStackedLayout* qstacklayout;
QSystemTrayIcon* trayIcon;
QTimer* m_pShowTimer;
QTimer* m_pShowTimer2;
int m_nDesktopHeight;
int m_nDesktopHeight2;
Drawer* drwer;
Two* two;
QTcpSocket* socket;
public slots:
void iconActivated(QSystemTrayIcon::ActivationReason reason);
void onMove();
void onMove2();
void showResearch();
void resolveMessage();
void solvedisconnect();
};
#endif // TALK_H