-
Notifications
You must be signed in to change notification settings - Fork 44
/
rumor_info.h
55 lines (43 loc) · 1.18 KB
/
rumor_info.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
#ifndef RUMOR_INFO_H
#define RUMOR_INFO_H
#include <QDialog>
//网络相关头文件
#include <QtNetwork/QNetworkAccessManager>
#include <QtNetwork/QNetworkRequest>
#include <QtNetwork/QNetworkReply>
#include <QtNetwork/QNetworkConfigurationManager>
//JSON相关头文件
#include <QJsonDocument>
#include <QJsonObject>
#include <QJsonArray>
#include <QFile>
namespace Ui {
class rumor_info;
}
class rumor_info : public QDialog
{
Q_OBJECT
public:
explicit rumor_info(QWidget *parent = 0);
~rumor_info();
void paraseRumorInfo(QString filename);
void getRumorInfo(QString rumor_id);
QString bgmClr_true = "42a163";
QString bgmClr_fake = "c41f20";
QString bgmClr_doubt = "484848";
void disRumorInfo(QJsonObject content_obj);
private slots:
void httpReadyRead(); //有可用数据
void httpFinished(); //完成下载
void on_btn_back_clicked();
private:
Ui::rumor_info *ui;
QNetworkAccessManager *manager;
QNetworkReply *reply;
QUrl url;
QFile *file;
QString filename;
QString rumor_infoApi = "https://vp.fact.qq.com/miniArtData?id=";
QString rumorInfoHtmlFileName = "html_rumor_info.txt";
};
#endif // RUMOR_INFO_H