34 lines
848 B
C++
34 lines
848 B
C++
#ifndef HTTPINTERFACE_H
|
|
#define HTTPINTERFACE_H
|
|
|
|
#include <QObject>
|
|
#include <QJsonObject>
|
|
|
|
class QNetworkAccessManager;
|
|
class QNetworkReply;
|
|
|
|
class HttpInterface:public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
HttpInterface(QObject* parent = nullptr);
|
|
~HttpInterface();
|
|
//static HttpInterface* GetInstance();
|
|
|
|
void getPointData(QString type,QString station = QString("0"),QString component = QString("0"),QString begin = "",QString end = "");
|
|
signals:
|
|
void sendPointData(QString type,QMap<qint64,double> map);
|
|
public slots:
|
|
void replyFinished(QNetworkReply *reply);
|
|
private:
|
|
void initial();
|
|
void readXML();
|
|
static HttpInterface* instance;
|
|
QString m_sFileName;
|
|
QString _Host;
|
|
QString _Port;
|
|
QString _Interface;
|
|
QNetworkAccessManager* _manager;
|
|
};
|
|
#endif // DATABASE_H
|