mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
Переделано под один мега-проект LMS с общим CMakeLists.txt
This commit is contained in:
62
InstructorsAndTrainees/connectorToServer/Core/tcpclient.h
Normal file
62
InstructorsAndTrainees/connectorToServer/Core/tcpclient.h
Normal file
@@ -0,0 +1,62 @@
|
||||
#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 "sendsystem.h"
|
||||
#include "Datas.h"
|
||||
|
||||
|
||||
class RecognizeSystem;
|
||||
class SendSystem;
|
||||
|
||||
class TCPClient : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
public:
|
||||
explicit TCPClient(QObject *parent = 0);
|
||||
void initialize(RecognizeSystem *recognize,SendSystem *sendSystem);
|
||||
void setConnect(ServerSettings *serverSettings);
|
||||
|
||||
void waitRead(int time);
|
||||
QTcpSocket* getSocket();
|
||||
~TCPClient();
|
||||
|
||||
bool getIsConnected() const;
|
||||
|
||||
signals:
|
||||
void sigSendDebugLog(QString message);
|
||||
void sigRecognize(QTcpSocket *socket);
|
||||
void sigServerDisconnect();
|
||||
void sigConnectionState(bool flag);
|
||||
void sigSetSocket(QTcpSocket *socket);
|
||||
|
||||
void signal_ConnectedToServer(bool state);
|
||||
|
||||
public slots:
|
||||
void slotSendCommand(QString message);
|
||||
void slotConnectNotify();
|
||||
|
||||
private slots:
|
||||
void slotReadyRead();
|
||||
|
||||
|
||||
private:
|
||||
SendSystem *sendSystem;
|
||||
QTcpSocket *socket;
|
||||
RecognizeSystem *recognizeSystem;
|
||||
bool isConnected;
|
||||
|
||||
void setDisconnect();
|
||||
};
|
||||
|
||||
#endif // TCPCLIENT_H
|
||||
Reference in New Issue
Block a user