-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverconn.h
44 lines (34 loc) · 833 Bytes
/
serverconn.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
#ifndef SERVERCONN_H
#define SERVERCONN_H
#include <QObject>
#include <QJsonDocument>
#include <QByteArray>
#include <QBuffer>
#include <QJsonObject>
#include <QHttpMultiPart>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QEventLoop>
#include <QDesktopServices>
class ServerConn : public QObject
{
Q_OBJECT
public:
explicit ServerConn(QObject *parent = nullptr);
~ServerConn();
static ServerConn *instance;
static ServerConn *inst();
static ServerConn *SingletonProvider () {
if(!ServerConnInstance){
ServerConnInstance = new ServerConn();
}
return ServerConnInstance;
}
static QString serverHost;
QNetworkAccessManager networkManager;
private:
static ServerConn* ServerConnInstance;
signals:
public slots:
};
#endif // SERVERCONN_H