You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
732 B
35 lines
732 B
#ifndef WEATHER_H
|
|
#define WEATHER_H
|
|
#include <QNetworkAccessManager>
|
|
#include <QNetworkRequest>
|
|
#include <QNetworkReply>
|
|
#include <QHttpPart>
|
|
#include <QHttpMultiPart>
|
|
#include <QMainWindow>
|
|
#include "ui_climate.h"
|
|
|
|
class climate;
|
|
|
|
class weather : public QMainWindow
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit weather(Ui::climate * p);
|
|
~weather();
|
|
/*城市的基本信息*/
|
|
QString city="", cityID="", swn="", sw0="", icon_path0="";
|
|
/*建立http连接*/
|
|
void http_sent();
|
|
Ui::climate* exUI;
|
|
private:
|
|
QNetworkAccessManager *manager;
|
|
/*获取天气信息*/
|
|
void getWeather();
|
|
private slots:
|
|
/*http数据返回处理函数*/
|
|
void replyFinished(QNetworkReply *reply);
|
|
|
|
};
|
|
|
|
#endif // WEATHER_H
|