mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJClient.git
synced 2026-03-28 05:25:39 +03:00
58 lines
1.3 KiB
C++
58 lines
1.3 KiB
C++
#ifndef TCPCLIENT_H
|
|
#define TCPCLIENT_H
|
|
|
|
#include <QObject>
|
|
#include <QTcpSocket>
|
|
#include <QHostAddress>
|
|
#include <QDataStream>
|
|
#include <QTcpServer>
|
|
#include <QFile>
|
|
#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 TCPClient : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
|
|
public:
|
|
explicit TCPClient(QObject *parent = 0);
|
|
void initialize(RecognizeSystem *recognize,ExternalExecuter *externalExecuter,SendSystem *sendSystem);
|
|
void setConnect(ServerSettings *serverSettings,QThread *thread);
|
|
|
|
void waitRead(int time);
|
|
QTcpSocket* getSocket();
|
|
~TCPClient();
|
|
|
|
signals:
|
|
void sigSendDebugLog(QString message);
|
|
void sigRecognize(QTcpSocket *socket);
|
|
void sigServerDisconnect();
|
|
void sigConnectionState(bool flag);
|
|
void sigSetSocket(QTcpSocket *socket);
|
|
|
|
public slots:
|
|
void slotSendCommand(QString message);
|
|
void slotConnectNotify();
|
|
|
|
private slots:
|
|
void slotReadyRead();
|
|
|
|
private:
|
|
SendSystem *sendSystem;
|
|
QTcpSocket *socket;
|
|
RecognizeSystem *recognizeSystem;
|
|
ExternalExecuter * externalExecuter;
|
|
|
|
void setDisconnect();
|
|
};
|
|
|
|
#endif // TCPCLIENT_H
|