forked from Blackmamba-xuan/QtQQ
-
Notifications
You must be signed in to change notification settings - Fork 0
/
chat.h
45 lines (38 loc) · 906 Bytes
/
chat.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
#ifndef CHAT_H
#define CHAT_H
#include <QWidget>
#include<QMouseEvent>
#include<QtGui>
#include<QDebug>
#include<QScrollBar>
#include<QFile>
#include "emotion.h"
namespace Ui {
class Chat;
}
class Chat : public QWidget
{
Q_OBJECT
public:
explicit Chat(QWidget *parent = 0);
~Chat();
QPoint move_point; //移动的距离
bool mouse_press; //鼠标按下
//鼠标按下事件
void mousePressEvent(QMouseEvent *event);
//鼠标释放事件
void mouseReleaseEvent(QMouseEvent *event);
//鼠标移动事件
void mouseMoveEvent(QMouseEvent *event);
//最小化及关闭
bool eventFilter(QObject *object, QEvent *e);
protected:
void showEvent(QShowEvent *event);
private slots:
void on_pushButton_2_clicked();
void sendemotion(QString s);
private:
Ui::Chat *ui;
Emotion* emotion;
};
#endif // CHAT_H