2020-08-08 11:44:16 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QObject>
|
2020-08-09 12:07:14 +00:00
|
|
|
#include <includes.h>
|
|
|
|
|
|
|
|
const auto INIT_MSG = R"({"msg": "init"})"_json;
|
2020-08-08 11:44:16 +00:00
|
|
|
|
|
|
|
class NetworkThread : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
2020-08-09 12:07:14 +00:00
|
|
|
private:
|
|
|
|
// add your variables here
|
2020-08-08 11:44:16 +00:00
|
|
|
public:
|
|
|
|
explicit NetworkThread(QObject *parent = nullptr);
|
|
|
|
public slots:
|
|
|
|
void process();
|
|
|
|
signals:
|
|
|
|
void finished();
|
|
|
|
void error(QString err);
|
2020-08-09 12:07:14 +00:00
|
|
|
void httpMessage(json data);
|
2020-08-08 11:44:16 +00:00
|
|
|
};
|