-
Notifications
You must be signed in to change notification settings - Fork 0
/
setuquery.h
52 lines (38 loc) · 928 Bytes
/
setuquery.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 SETUQUERY_H
#define SETUQUERY_H
#include <QObject>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QNetworkRequest>
// Json
#include <QJsonDocument>
#include <QJsonObject>
#include <QJsonArray>
#include <QJsonValue>
#include <QJsonParseError>
// File
#include <QFile>
#include <QDir>
#include <QEventLoop>
#include <QDebug>
#include "setuinfo.h"
class SetuQuery : public QObject
{
Q_OBJECT
public:
explicit SetuQuery(const QString& keyword, QObject *parent = nullptr);
SetuInfo querySetu();
private:
QString m_keyword;
const QString APIkey = "587436385f4da24a6182c1";
void downloadPhoto(const QString& url);
QNetworkAccessManager downloadManager;
QNetworkReply* downloadReply;
QFile *downloadFile;
private slots:
void downloadFinished();
void downloadReady();
void updateDataReadProgress(qint64,qint64);
signals:
};
#endif // SETUQUERY_H