mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJClient.git
synced 2026-03-28 05:25:39 +03:00
63 lines
1.2 KiB
C++
63 lines
1.2 KiB
C++
#ifndef TCPCLIENT_H
|
|
#define TCPCLIENT_H
|
|
|
|
#include <QObject>
|
|
#include <QTcpSocket>
|
|
#include <QHostAddress>
|
|
#include <QDataStream>
|
|
#include <QTcpServer>
|
|
#include <QFile>
|
|
#include <QDir>
|
|
#include <QCoreApplication>
|
|
#include <Core\recognizesystem.h>
|
|
#include <Core\tools.h>
|
|
#include <Core\UpdateController.h>
|
|
#include <Core\externalexecuter.h>
|
|
|
|
|
|
class UpdateController;
|
|
class RecognizeSystem;
|
|
class SendSystem;
|
|
class MainWindow;
|
|
class ServerSettings;
|
|
|
|
class TCPClient : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
|
|
public:
|
|
explicit TCPClient(QObject *parent = 0);
|
|
void initialize(MainWindow *mainWindow,RecognizeSystem *recognize,ExternalExecuter *externalExecuter,SendSystem *sendSystem);
|
|
void setConnect(ServerSettings *serverSettings);
|
|
|
|
void waitRead(int time);
|
|
QTcpSocket* getSocket();
|
|
~TCPClient();
|
|
|
|
bool getIsConnected() const;
|
|
|
|
signals:
|
|
void sigSendDebugLog(QString message);
|
|
void sigServerDisconnect();
|
|
void sigConnectionState(bool flag);
|
|
|
|
public slots:
|
|
void slotConnectNotify();
|
|
|
|
private slots:
|
|
void slotReadyRead();
|
|
|
|
|
|
private:
|
|
SendSystem *sendSystem;
|
|
QTcpSocket *socket;
|
|
RecognizeSystem *recognizeSystem;
|
|
ExternalExecuter * externalExecuter;
|
|
bool isConnected;
|
|
|
|
void setDisconnect();
|
|
};
|
|
|
|
#endif // TCPCLIENT_H
|