mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJClient.git
synced 2026-03-28 05:25:39 +03:00
ref: clean unused in Core
This commit is contained in:
@@ -22,17 +22,15 @@
|
||||
|
||||
class UpdateController : public QObject
|
||||
{
|
||||
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit UpdateController(QObject *parent = 0);
|
||||
~UpdateController();
|
||||
|
||||
void initialize(VersionContainer *versionContainer,DataParserOutput *dataParser, SendSystem *sendSystem);
|
||||
void calculateCommonHash();
|
||||
void calculateStreamingHash();
|
||||
~UpdateController();
|
||||
|
||||
void updateFilesOnServer(QList<FileData> *fileSendList);
|
||||
void checkCanUpdate();
|
||||
|
||||
|
||||
@@ -134,9 +134,7 @@ void DataParser::xmlParser(const QByteArray& array)
|
||||
|
||||
if (value == "UNCHANGEABLE")
|
||||
{
|
||||
//emit sigNotify(tr("Нельзя выгружать в базовую версию"));
|
||||
//postProcessSystem->showUpdateList();
|
||||
//emit recognizeSystem->sigShowUpdateList();
|
||||
//версию нельзя изменять
|
||||
}
|
||||
|
||||
if (value == "CHANGEABLE")
|
||||
|
||||
@@ -19,14 +19,10 @@ class DataParser : public QObject
|
||||
public:
|
||||
explicit DataParser(QObject *parent = 0);
|
||||
~DataParser() = default;
|
||||
|
||||
void initialize(PostProcessorSystem *postProcessSystem);
|
||||
ServerSettings* getClientSettings();
|
||||
void xmlParser(const QByteArray& array);
|
||||
|
||||
signals:
|
||||
void sigNotify(QString notify);
|
||||
void sigUpdateFilesOnServer(QList<FileData> *fileSendList);
|
||||
|
||||
private:
|
||||
PostProcessorSystem *postProcessSystem;
|
||||
};
|
||||
|
||||
@@ -49,11 +49,6 @@ void PostProcessorSystem::startCompare()
|
||||
emit sigStartCompare(serverStreamingHash,*localStreamingHash);
|
||||
}
|
||||
|
||||
void PostProcessorSystem::showUpdateList()
|
||||
{
|
||||
emit sigShowUpdateList();
|
||||
}
|
||||
|
||||
void PostProcessorSystem::compareFiles()
|
||||
{
|
||||
updateController->updateFilesOnServer(hashComparer->getFilesForUpdate());
|
||||
|
||||
@@ -19,19 +19,15 @@ public:
|
||||
void socketDisable();
|
||||
void serverBlocked();
|
||||
void startCompare();
|
||||
void showUpdateList();
|
||||
void compareFiles();
|
||||
void checkAccessType(const QString& type);
|
||||
void saveLoginData(ServerAuthorization *auth);
|
||||
void setServerVersion(StreamingVersionData *serverVersion);
|
||||
void showServerDataList(QList<StreamingVersionData*> *versionList);
|
||||
|
||||
void calculateCommonHash();
|
||||
signals:
|
||||
void sigSocketDisabled();
|
||||
void sigServerBlocked();
|
||||
void sigStartCompare(QList<FileData> *serverStreamingHash, QList<FileData> localStreamingHash);
|
||||
void sigShowUpdateList();
|
||||
void sigCallUpdateList();
|
||||
void sigSaveLoginData(ServerAuthorization *serverAuth);
|
||||
|
||||
|
||||
@@ -9,11 +9,9 @@ RecognizeSystem::RecognizeSystem(QObject *parent):
|
||||
packetType = PacketType::TYPE_NONE;
|
||||
filePath.clear();
|
||||
fileSize = 0;
|
||||
message.clear();
|
||||
sizeReceiveData = 0;
|
||||
tmpBlock.clear();
|
||||
countSend = 0;
|
||||
folderList = new QList<QString>;
|
||||
}
|
||||
|
||||
void RecognizeSystem::initialize(DataParser *dataParser, VersionContainer *versionContainer,PostProcessorSystem *postProcessorSystem)
|
||||
|
||||
@@ -13,37 +13,29 @@
|
||||
#include <Data\streamingversiondata.h>
|
||||
#include <Core\hashcomparer.h>
|
||||
|
||||
class ServerAuthorization;
|
||||
|
||||
class RecognizeSystem : public QObject
|
||||
{
|
||||
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit RecognizeSystem(QObject *parent = 0);
|
||||
~RecognizeSystem(){};
|
||||
void initialize(DataParser *dataParser, VersionContainer* versionContainer,PostProcessorSystem *postProcessorSystem);
|
||||
|
||||
void recognize(QTcpSocket *socket);
|
||||
void showServerDataList(QList<StreamingVersionData*> *showServerDataList);
|
||||
signals:
|
||||
void sigUpdateBytesAvailable();
|
||||
void sigLoadComplete();
|
||||
void sigNeedUpdate(bool flag,qint64 size,quint64 fileCount,quint64 fileDelete);
|
||||
void sigSendDebugLog(QString message);
|
||||
void sigSocketWaitForReadyRead(int waitTime);
|
||||
void sigAnimationActivated(bool flag);
|
||||
void sigCheckUpdate();
|
||||
void sigdRecalculateHashOnServerState();
|
||||
|
||||
private:
|
||||
QList<QString> *folderList;
|
||||
VersionContainer *versionContainer;
|
||||
DataParser *dataParser;
|
||||
PostProcessorSystem *postProcessorSystem;
|
||||
PacketType packetType;
|
||||
QString message;
|
||||
QString filePath;
|
||||
QByteArray tmpBlock;
|
||||
|
||||
|
||||
@@ -121,11 +121,6 @@ void ScreenChecker::updateDisplayData()
|
||||
dataParserOutput->addRunData(*displaysIndexList);
|
||||
}
|
||||
|
||||
QString ScreenChecker::getScreenCount() const
|
||||
{
|
||||
return QString::number(screenCount);
|
||||
}
|
||||
|
||||
void ScreenChecker::initialize(DataParserOutput *dataParserOutput, QHBoxLayout *layout)
|
||||
{
|
||||
this->layout = layout;
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
#include <Data/monitorInfo.h>
|
||||
|
||||
class DataParser;
|
||||
class ScreenChecker : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -26,11 +25,8 @@ public:
|
||||
void initialize(DataParserOutput *dataParserOutput, QHBoxLayout *layout);
|
||||
~ScreenChecker();
|
||||
void check();
|
||||
QString getScreenCount() const;
|
||||
|
||||
|
||||
private:
|
||||
QWidget *mainWidget;
|
||||
DataParserOutput *dataParserOutput;
|
||||
QHBoxLayout *layout;
|
||||
qint64 screenCount;
|
||||
|
||||
@@ -167,35 +167,6 @@ void SendSystem::sendFinish()
|
||||
socket->waitForReadyRead(100);
|
||||
}
|
||||
|
||||
void SendSystem::sendChangeVersion(StreamingVersionData* streamingVersion)
|
||||
{
|
||||
QDataStream stream(socket);
|
||||
stream.setVersion(QDataStream::Qt_DefaultCompiledVersion);
|
||||
stream << PacketType::CHANGE_DATA_VERSION;
|
||||
stream << streamingVersion->getViewName();
|
||||
|
||||
socket->waitForReadyRead(100);
|
||||
}
|
||||
|
||||
void SendSystem::sendDeleteVersion(StreamingVersionData *streamingVersion)
|
||||
{
|
||||
QDataStream stream(socket);
|
||||
stream.setVersion(QDataStream::Qt_DefaultCompiledVersion);
|
||||
stream << PacketType::DELETE_DATA_VERSION;
|
||||
stream << streamingVersion->getViewName();
|
||||
|
||||
socket->waitForReadyRead(100);
|
||||
}
|
||||
|
||||
void SendSystem::sendCopyVersion(const QString& versionName)
|
||||
{
|
||||
QDataStream stream(socket);
|
||||
stream.setVersion(QDataStream::Qt_DefaultCompiledVersion);
|
||||
stream << PacketType::COPY_VERSION;
|
||||
|
||||
stream << versionName;
|
||||
}
|
||||
|
||||
void SendSystem::sendPacketType(PacketType packetType)
|
||||
{
|
||||
QDataStream stream(socket);
|
||||
|
||||
@@ -16,19 +16,14 @@ public:
|
||||
explicit SendSystem(QObject* parent = nullptr);
|
||||
void setSocket(QTcpSocket *socket);
|
||||
void sendClientAutorization();
|
||||
void sendDisable();
|
||||
void sendFileBlock(const QString& path);
|
||||
void sendFolderBlock(const QString& path);
|
||||
void sendFileBlockWithVersion(const QString& localPath,const QString& serverPath);
|
||||
void sendQTConnect();
|
||||
void sendXMLAnswer(const QByteArray& array);
|
||||
void sendFinish();
|
||||
void sendChangeVersion(StreamingVersionData *streamingVersion);
|
||||
void sendDeleteVersion(StreamingVersionData *streamingVersion);
|
||||
void sendCopyVersion(const QString& versionName);
|
||||
void sendCheckHash();
|
||||
void sendPacketType(PacketType packetType);
|
||||
|
||||
~SendSystem(){};
|
||||
signals:
|
||||
void sigSend();
|
||||
|
||||
@@ -14,9 +14,6 @@ void TCPClient::initialize(RecognizeSystem *recognize,SendSystem *sendSystem)
|
||||
this->recognizeSystem = recognize;
|
||||
this->sendSystem = sendSystem;
|
||||
isConnected = false;
|
||||
|
||||
connect(recognize,&RecognizeSystem::sigSocketWaitForReadyRead,this,&TCPClient::waitRead,Qt::DirectConnection);
|
||||
|
||||
emit sigSendDebugLog(Tools::getTime() + " Client started");
|
||||
}
|
||||
|
||||
@@ -59,17 +56,6 @@ void TCPClient::setDisconnect()
|
||||
emit sigSendDebugLog("Server disabled");
|
||||
}
|
||||
|
||||
|
||||
void TCPClient:: waitRead(int time)
|
||||
{
|
||||
socket->waitForReadyRead(time);
|
||||
}
|
||||
|
||||
QTcpSocket *TCPClient::getSocket()
|
||||
{
|
||||
return socket;
|
||||
}
|
||||
|
||||
void TCPClient::slotConnectNotify()
|
||||
{
|
||||
if(socket->state() != QTcpSocket::ConnectedState)
|
||||
|
||||
@@ -14,23 +14,14 @@
|
||||
#include <Core\tools.h>
|
||||
#include <Core\externalexecuter.h>
|
||||
|
||||
|
||||
class UpdateController;
|
||||
class RecognizeSystem;
|
||||
class ServerSettings;
|
||||
|
||||
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;
|
||||
|
||||
@@ -11,11 +11,6 @@ VersionContainer::~VersionContainer()
|
||||
|
||||
}
|
||||
|
||||
QString VersionContainer::getServerVersion() const
|
||||
{
|
||||
return serverVersionData->getViewName();
|
||||
}
|
||||
|
||||
QString VersionContainer::getLocalVersion() const
|
||||
{
|
||||
return localVersionData->getViewName();
|
||||
|
||||
@@ -10,8 +10,6 @@ class VersionContainer : public QObject
|
||||
public:
|
||||
explicit VersionContainer(QObject *parent = nullptr);
|
||||
~VersionContainer();
|
||||
|
||||
QString getServerVersion() const;
|
||||
QString getLocalVersion() const;
|
||||
|
||||
StreamingVersionData *getLocalVersionData() const;
|
||||
|
||||
Reference in New Issue
Block a user