-
Notifications
You must be signed in to change notification settings - Fork 65
/
search.h
50 lines (42 loc) · 1.04 KB
/
search.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 SEARCH_H
#define SEARCH_H
#include <QWidget>
#include<QMouseEvent>
#include<QtGui>
#include<QDebug>
#include<QFile>
#include<QNetworkAccessManager>
#include<QNetworkRequest>
#include<QJsonObject>
#include<QByteArray>
#include<QNetworkReply>
namespace Ui {
class Search;
}
class Search : public QWidget
{
Q_OBJECT
public:
explicit Search(QWidget *parent = 0);
~Search();
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 doSearch(QString message);
protected:
void showEvent(QShowEvent *event);
private slots:
void on_pushButton_2_clicked();
void on_pushButton_clicked();
void parseresult(QNetworkReply* reply);
private:
Ui::Search *ui;
};
#endif // SEARCH_H