mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJClient.git
synced 2026-03-28 05:25:39 +03:00
ref: link argument
This commit is contained in:
@@ -4,7 +4,8 @@
|
|||||||
#include <QThread>
|
#include <QThread>
|
||||||
|
|
||||||
UpdateController::UpdateController(DataParserOutput *dataParserOut, SendSystem *sendSystem, QObject *parent) :
|
UpdateController::UpdateController(DataParserOutput *dataParserOut, SendSystem *sendSystem, QObject *parent) :
|
||||||
QObject(parent)
|
QObject(parent),
|
||||||
|
versionContainer(nullptr)
|
||||||
{
|
{
|
||||||
this->sendSystem = sendSystem;
|
this->sendSystem = sendSystem;
|
||||||
this->dataParserOut = dataParserOut;
|
this->dataParserOut = dataParserOut;
|
||||||
@@ -34,7 +35,7 @@ void UpdateController::calculateStreamingHash()
|
|||||||
dataParserOut->createFileDataList(streamingDataList,streamingHashFilename);
|
dataParserOut->createFileDataList(streamingDataList,streamingHashFilename);
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<FileData> UpdateController::calculateHash(QString path,QString ignoreName)
|
QList<FileData> UpdateController::calculateHash(const QString& path,const QString& ignoreName)
|
||||||
{
|
{
|
||||||
qDebug() << "Try calculate";
|
qDebug() << "Try calculate";
|
||||||
|
|
||||||
@@ -56,7 +57,7 @@ QList<FileData> UpdateController::calculateHash(QString path,QString ignoreName)
|
|||||||
QFileInfo fileInfo(dirIterator.next());
|
QFileInfo fileInfo(dirIterator.next());
|
||||||
FileData currentFile;
|
FileData currentFile;
|
||||||
QString fileName = fileInfo.fileName();
|
QString fileName = fileInfo.fileName();
|
||||||
if(fileInfo.isDir() && !fileInfo.fileName().startsWith(".") && fileInfo.fileName() != "RRJLoader")
|
if(fileInfo.isDir() && !fileName.startsWith(".") && fileName != "RRJLoader")
|
||||||
{
|
{
|
||||||
currentFile.path = Tools::createLocalPath(fileInfo.absoluteFilePath());
|
currentFile.path = Tools::createLocalPath(fileInfo.absoluteFilePath());
|
||||||
currentFile.hash = "FOLDER";
|
currentFile.hash = "FOLDER";
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ private:
|
|||||||
QList<FileData> appDataList;
|
QList<FileData> appDataList;
|
||||||
QList<FileData> streamingDataList;
|
QList<FileData> streamingDataList;
|
||||||
|
|
||||||
QList<FileData> calculateHash(QString path,QString ignoreName);
|
QList<FileData> calculateHash(const QString& path,const QString& ignoreName);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
#include "Core/dataparser.h"
|
#include "Core/dataparser.h"
|
||||||
|
|
||||||
DataParser::DataParser(QObject *parent) :
|
DataParser::DataParser(QObject *parent) :
|
||||||
QObject(parent)
|
QObject(parent),
|
||||||
|
postProcessSystem(nullptr)
|
||||||
{
|
{
|
||||||
if(!QDir(fullStaticDataFolderName).exists()){
|
if(!QDir(fullStaticDataFolderName).exists()){
|
||||||
QDir().mkdir(fullStaticDataFolderName);
|
QDir().mkdir(fullStaticDataFolderName);
|
||||||
@@ -94,7 +95,7 @@ ServerSettings *DataParser::getClientSettings()
|
|||||||
return settings;
|
return settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DataParser::xmlParser(QByteArray array)
|
void DataParser::xmlParser(const QByteArray& array)
|
||||||
{
|
{
|
||||||
QXmlStreamReader xmlReader(array);
|
QXmlStreamReader xmlReader(array);
|
||||||
|
|
||||||
@@ -171,19 +172,23 @@ void DataParser::xmlParser(QByteArray array)
|
|||||||
QString name = attr.name().toString();
|
QString name = attr.name().toString();
|
||||||
QString value = attr.value().toString();
|
QString value = attr.value().toString();
|
||||||
|
|
||||||
if (name == "Result"){
|
if (name == "Result")
|
||||||
|
{
|
||||||
serverAuth->Result = value == "true" ? true : false;
|
serverAuth->Result = value == "true" ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (name == "InstructorName"){
|
if (name == "InstructorName")
|
||||||
|
{
|
||||||
serverAuth->InstructorName = value;
|
serverAuth->InstructorName = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (name == "ClientName"){
|
if (name == "ClientName")
|
||||||
|
{
|
||||||
serverAuth->ClientName = value;
|
serverAuth->ClientName = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (name == "AccessType"){
|
if (name == "AccessType")
|
||||||
|
{
|
||||||
serverAuth->AccessType = value;
|
serverAuth->AccessType = value;
|
||||||
postProcessSystem->checkAccessType(value);
|
postProcessSystem->checkAccessType(value);
|
||||||
//recognizeSystem->checkAccessType(value);
|
//recognizeSystem->checkAccessType(value);
|
||||||
@@ -260,8 +265,3 @@ void DataParser::xmlParser(QByteArray array)
|
|||||||
xmlReader.readNext();
|
xmlReader.readNext();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DataParser::~DataParser()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -12,27 +12,22 @@
|
|||||||
#include <Core/tools.h>
|
#include <Core/tools.h>
|
||||||
#include "Core/postprocessorsystem.h"
|
#include "Core/postprocessorsystem.h"
|
||||||
|
|
||||||
class NotifyController;
|
|
||||||
|
|
||||||
class DataParser : public QObject
|
class DataParser : public QObject
|
||||||
{
|
{
|
||||||
|
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit DataParser(QObject *parent = 0);
|
explicit DataParser(QObject *parent = 0);
|
||||||
|
~DataParser() = default;
|
||||||
void initialize(PostProcessorSystem *postProcessSystem);
|
void initialize(PostProcessorSystem *postProcessSystem);
|
||||||
|
|
||||||
~DataParser();
|
|
||||||
ServerSettings* getClientSettings();
|
ServerSettings* getClientSettings();
|
||||||
void xmlParser(QByteArray array);
|
void xmlParser(const QByteArray& array);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void sigNotify(QString notify);
|
void sigNotify(QString notify);
|
||||||
void sigUpdateFilesOnServer(QList<FileData> *fileSendList);
|
void sigUpdateFilesOnServer(QList<FileData> *fileSendList);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ClientAutorization *authPassCache;
|
|
||||||
PostProcessorSystem *postProcessSystem;
|
PostProcessorSystem *postProcessSystem;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
#include "dataparseroutput.h"
|
#include "dataparseroutput.h"
|
||||||
|
|
||||||
DataParserOutput::DataParserOutput() {}
|
DataParserOutput::DataParserOutput(QObject *parent) :
|
||||||
|
QObject(parent),
|
||||||
|
authPassCache(nullptr){}
|
||||||
|
|
||||||
QByteArray DataParserOutput::xmlAnswer_notify(QString code)
|
QByteArray DataParserOutput::xmlAnswer_notify(const QString& code)
|
||||||
{
|
{
|
||||||
|
|
||||||
QList<SXmlAnswerTag> listTag;
|
QList<SXmlAnswerTag> listTag;
|
||||||
|
|
||||||
SAttribute attribute1 = {"Code", code};
|
SAttribute attribute1 = {"Code", code};
|
||||||
@@ -16,7 +17,7 @@ QByteArray DataParserOutput::xmlAnswer_notify(QString code)
|
|||||||
return xmlAnswer(listTag);
|
return xmlAnswer(listTag);
|
||||||
}
|
}
|
||||||
|
|
||||||
QByteArray DataParserOutput::xmlAnswer(QList<SXmlAnswerTag> listTag, QString elemUp1, QString elemUp2)
|
QByteArray DataParserOutput::xmlAnswer(const QList<SXmlAnswerTag>& listTag, const QString& elemUp1, const QString& elemUp2)
|
||||||
{
|
{
|
||||||
/* Открываем файл для Записи*/
|
/* Открываем файл для Записи*/
|
||||||
QFile file(tempName);
|
QFile file(tempName);
|
||||||
@@ -77,7 +78,7 @@ QByteArray DataParserOutput::xmlAnswer(QList<SXmlAnswerTag> listTag, QString ele
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DataParserOutput::createFileDataList(QList<FileData> fileDataList,QString filename)
|
void DataParserOutput::createFileDataList(const QList<FileData>& fileDataList,const QString& filename)
|
||||||
{
|
{
|
||||||
QFile file(filename);
|
QFile file(filename);
|
||||||
file.open(QIODevice::WriteOnly);
|
file.open(QIODevice::WriteOnly);
|
||||||
@@ -215,7 +216,7 @@ void DataParserOutput::createAuthData(ServerAuthorization *serverAuth)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DataParserOutput::createAuthDataOffline(QString username, QString pass)
|
void DataParserOutput::createAuthDataOffline(const QString& username,const QString& pass)
|
||||||
{
|
{
|
||||||
QFile file(authTempName);
|
QFile file(authTempName);
|
||||||
file.open(QIODevice::WriteOnly);
|
file.open(QIODevice::WriteOnly);
|
||||||
@@ -255,7 +256,7 @@ void DataParserOutput::addRunData(QList<int> displays)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DataParserOutput::saveClientSettrings(QString language, bool isAutoStart)
|
void DataParserOutput::saveClientSettrings(const QString& language, bool isAutoStart)
|
||||||
{
|
{
|
||||||
QFile file(settingsName);
|
QFile file(settingsName);
|
||||||
file.open(QIODevice::ReadOnly | QIODevice::Text);
|
file.open(QIODevice::ReadOnly | QIODevice::Text);
|
||||||
@@ -277,7 +278,7 @@ void DataParserOutput::saveClientSettrings(QString language, bool isAutoStart)
|
|||||||
file.close();
|
file.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<FileData>* DataParserOutput::xmlFileDataParse(QByteArray array, QString filter = "")
|
QList<FileData>* DataParserOutput::xmlFileDataParse(const QByteArray& array,const QString& filter)
|
||||||
{
|
{
|
||||||
QXmlStreamReader xmlReader(array);
|
QXmlStreamReader xmlReader(array);
|
||||||
QList<FileData> *datas = new QList<FileData>;
|
QList<FileData> *datas = new QList<FileData>;
|
||||||
|
|||||||
@@ -14,18 +14,18 @@ class DataParserOutput : public QObject
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
DataParserOutput();
|
explicit DataParserOutput(QObject *parent = 0);
|
||||||
void createFileDataList(QList<FileData> fileDataList, QString filename);
|
void createFileDataList(const QList<FileData>& fileDataList,const QString& filename);
|
||||||
void createAuthMessage(ClientAutorization *auth);
|
void createAuthMessage(ClientAutorization *auth);
|
||||||
void createServerSettings(ServerSettings *serverSettings);
|
void createServerSettings(ServerSettings *serverSettings);
|
||||||
void changeVersion(StreamingVersionData *versionData);
|
void changeVersion(StreamingVersionData *versionData);
|
||||||
void createAuthData(ServerAuthorization *serverAuth);
|
void createAuthData(ServerAuthorization *serverAuth);
|
||||||
void createAuthDataOffline(QString username, QString pass);
|
void createAuthDataOffline(const QString& username,const QString& pass);
|
||||||
void addRunData(QList<int> displays);
|
void addRunData(QList<int> displays);
|
||||||
void saveClientSettrings(QString language, bool isAutoStart);
|
void saveClientSettrings(const QString& language, bool isAutoStart);
|
||||||
QList<FileData> *xmlFileDataParse(QByteArray array, QString filter);
|
QList<FileData> *xmlFileDataParse(const QByteArray& array,const QString& filter = "");
|
||||||
QByteArray xmlAnswer_notify(QString code);
|
QByteArray xmlAnswer_notify(const QString& code);
|
||||||
QByteArray xmlAnswer(QList<SXmlAnswerTag> listTag, QString elemUp1 ="", QString elemUp2 ="");
|
QByteArray xmlAnswer(const QList<SXmlAnswerTag>& listTag, const QString& elemUp1 = "", const QString& elemUp2 = "");
|
||||||
private:
|
private:
|
||||||
const QString XMLLanguageProperty = "Language=\"";
|
const QString XMLLanguageProperty = "Language=\"";
|
||||||
const QString XMLAutoStartProperty = "AutoStart=\"";
|
const QString XMLAutoStartProperty = "AutoStart=\"";
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
#include "externalexecuter.h"
|
#include "externalexecuter.h"
|
||||||
|
|
||||||
ExternalExecuter::ExternalExecuter() {}
|
|
||||||
|
|
||||||
ExternalExecuter::~ExternalExecuter() {}
|
|
||||||
|
|
||||||
void ExternalExecuter::callApp()
|
void ExternalExecuter::callApp()
|
||||||
{
|
{
|
||||||
QProcess *myProcess = new QProcess(this);
|
QProcess *myProcess = new QProcess(this);
|
||||||
|
|||||||
@@ -15,10 +15,10 @@ class ExternalExecuter : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ExternalExecuter();
|
ExternalExecuter() {};
|
||||||
|
~ExternalExecuter() {};
|
||||||
void callApp();
|
void callApp();
|
||||||
bool findApp();
|
bool findApp();
|
||||||
~ExternalExecuter();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString programPath;
|
QString programPath;
|
||||||
|
|||||||
@@ -1,20 +1,20 @@
|
|||||||
#include "hashcomparer.h"
|
#include "hashcomparer.h"
|
||||||
|
|
||||||
HashComparer::HashComparer(QObject *)
|
HashComparer::HashComparer(QObject *) :
|
||||||
|
updateWidget(nullptr),
|
||||||
|
filesForUpdate(nullptr),
|
||||||
|
versionContainer(nullptr)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void HashComparer::initialize(VersionContainer *versionContainer)
|
void HashComparer::initialize(VersionContainer *versionContainer)
|
||||||
{
|
{
|
||||||
|
|
||||||
this->versionContainer = versionContainer;
|
this->versionContainer = versionContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
void HashComparer::CompareDeltas(QList<FileData> *serverStreamingHash, QList<FileData> localStreamingHash)
|
void HashComparer::CompareDeltas(QList<FileData> *serverStreamingHash, QList<FileData> localStreamingHash)
|
||||||
{
|
{
|
||||||
// QList<FileData> *serverStreamingHash = new QList<FileData>;
|
|
||||||
// QList<FileData> *localStreamingHash = new QList<FileData>;
|
|
||||||
QList<FileData> *files = new QList<FileData>;
|
QList<FileData> *files = new QList<FileData>;
|
||||||
|
|
||||||
QMutableListIterator<FileData> iterator(localStreamingHash);
|
QMutableListIterator<FileData> iterator(localStreamingHash);
|
||||||
@@ -74,8 +74,3 @@ QList<FileData> *HashComparer::getFilesForUpdate() const
|
|||||||
|
|
||||||
return filesForUpdate;
|
return filesForUpdate;
|
||||||
}
|
}
|
||||||
|
|
||||||
HashComparer::~HashComparer()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -8,9 +8,6 @@
|
|||||||
#include <Core/tools.h>
|
#include <Core/tools.h>
|
||||||
#include <Widgets/updatenotifywidget.h>
|
#include <Widgets/updatenotifywidget.h>
|
||||||
|
|
||||||
class UpdateNotifyWidget;
|
|
||||||
class VersionContainer;
|
|
||||||
|
|
||||||
class HashComparer :public QObject
|
class HashComparer :public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@@ -18,7 +15,7 @@ public:
|
|||||||
explicit HashComparer(QObject *parent = nullptr);
|
explicit HashComparer(QObject *parent = nullptr);
|
||||||
void initialize(VersionContainer *versionContainer);
|
void initialize(VersionContainer *versionContainer);
|
||||||
void CompareDeltas(QList<FileData> *serverStreamingHash, QList<FileData> localStreamingHash);
|
void CompareDeltas(QList<FileData> *serverStreamingHash, QList<FileData> localStreamingHash);
|
||||||
~HashComparer();
|
~HashComparer() = default;
|
||||||
|
|
||||||
void showDeltas();
|
void showDeltas();
|
||||||
void setWidget(UpdateNotifyWidget *updateWidget);
|
void setWidget(UpdateNotifyWidget *updateWidget);
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ NotifyController::NotifyController(QObject *parent) : QObject(parent)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void NotifyController::showWarning(QString text)
|
void NotifyController::showWarning(const QString& text)
|
||||||
{
|
{
|
||||||
QMessageBox warning;
|
QMessageBox warning;
|
||||||
warning.setText(text);
|
warning.setText(text);
|
||||||
|
|||||||
@@ -9,10 +9,7 @@ class NotifyController : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit NotifyController(QObject *parent = nullptr);
|
explicit NotifyController(QObject *parent = nullptr);
|
||||||
|
void showWarning(const QString& text);
|
||||||
void showWarning(QString text);
|
|
||||||
signals:
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // NOTIFYCONTROLLER_H
|
#endif // NOTIFYCONTROLLER_H
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
#include "postprocessorsystem.h"
|
#include "postprocessorsystem.h"
|
||||||
|
|
||||||
PostProcessorSystem::PostProcessorSystem(QObject *parent) : QObject(parent){}
|
PostProcessorSystem::PostProcessorSystem(QObject *parent) :
|
||||||
|
QObject(parent),
|
||||||
|
hashComparer(nullptr),
|
||||||
|
versionContainer(nullptr),
|
||||||
|
updateController(nullptr),
|
||||||
|
dataParserOutput(nullptr){}
|
||||||
|
|
||||||
void PostProcessorSystem::initialize(DataParserOutput *dataParserOutput,
|
void PostProcessorSystem::initialize(DataParserOutput *dataParserOutput,
|
||||||
HashComparer *hashComparer,
|
HashComparer *hashComparer,
|
||||||
@@ -54,7 +59,7 @@ void PostProcessorSystem::compareFiles()
|
|||||||
updateController->updateFilesOnServer(hashComparer->getFilesForUpdate());
|
updateController->updateFilesOnServer(hashComparer->getFilesForUpdate());
|
||||||
}
|
}
|
||||||
|
|
||||||
void PostProcessorSystem::checkAccessType(QString type)
|
void PostProcessorSystem::checkAccessType(const QString& type)
|
||||||
{
|
{
|
||||||
if(type == "instructor")
|
if(type == "instructor")
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -14,13 +14,14 @@ public:
|
|||||||
void initialize(DataParserOutput *dataParserOutput,
|
void initialize(DataParserOutput *dataParserOutput,
|
||||||
HashComparer *hashComparer,
|
HashComparer *hashComparer,
|
||||||
VersionContainer* versionContainer,
|
VersionContainer* versionContainer,
|
||||||
UpdateController* updateContorller);
|
UpdateController* updateController);
|
||||||
|
|
||||||
void socketDisable();
|
void socketDisable();
|
||||||
void serverBlocked();
|
void serverBlocked();
|
||||||
void startCompare();
|
void startCompare();
|
||||||
void showUpdateList();
|
void showUpdateList();
|
||||||
void compareFiles();
|
void compareFiles();
|
||||||
void checkAccessType(QString type);
|
void checkAccessType(const QString& type);
|
||||||
void saveLoginData(ServerAuthorization *auth);
|
void saveLoginData(ServerAuthorization *auth);
|
||||||
void setServerVersion(StreamingVersionData *serverVersion);
|
void setServerVersion(StreamingVersionData *serverVersion);
|
||||||
void showServerDataList(QList<StreamingVersionData*> *versionList);
|
void showServerDataList(QList<StreamingVersionData*> *versionList);
|
||||||
|
|||||||
@@ -2,7 +2,10 @@
|
|||||||
|
|
||||||
|
|
||||||
RecognizeSystem::RecognizeSystem(QObject *parent):
|
RecognizeSystem::RecognizeSystem(QObject *parent):
|
||||||
QObject(parent)
|
QObject(parent),
|
||||||
|
versionContainer(nullptr),
|
||||||
|
dataParser(nullptr),
|
||||||
|
postProcessorSystem(nullptr)
|
||||||
{
|
{
|
||||||
packetType = PacketType::TYPE_NONE;
|
packetType = PacketType::TYPE_NONE;
|
||||||
filePath.clear();
|
filePath.clear();
|
||||||
@@ -14,11 +17,6 @@ RecognizeSystem::RecognizeSystem(QObject *parent):
|
|||||||
folderList = new QList<QString>;
|
folderList = new QList<QString>;
|
||||||
}
|
}
|
||||||
|
|
||||||
RecognizeSystem::~RecognizeSystem()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void RecognizeSystem::initialize(DataParser *dataParser, VersionContainer *versionContainer,PostProcessorSystem *postProcessorSystem)
|
void RecognizeSystem::initialize(DataParser *dataParser, VersionContainer *versionContainer,PostProcessorSystem *postProcessorSystem)
|
||||||
{
|
{
|
||||||
this->versionContainer = versionContainer;
|
this->versionContainer = versionContainer;
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ class RecognizeSystem : public QObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit RecognizeSystem(QObject *parent = 0);
|
explicit RecognizeSystem(QObject *parent = 0);
|
||||||
~RecognizeSystem();
|
~RecognizeSystem(){};
|
||||||
void initialize(DataParser *dataParser, VersionContainer* versionContainer,PostProcessorSystem *postProcessorSystem);
|
void initialize(DataParser *dataParser, VersionContainer* versionContainer,PostProcessorSystem *postProcessorSystem);
|
||||||
|
|
||||||
void recognize(QTcpSocket *socket);
|
void recognize(QTcpSocket *socket);
|
||||||
|
|||||||
@@ -28,8 +28,8 @@ void ScreenChecker::check()
|
|||||||
QIcon checkedIcon;
|
QIcon checkedIcon;
|
||||||
checkedIcon.addPixmap(checkedPixmap,QIcon::Disabled,QIcon::On);
|
checkedIcon.addPixmap(checkedPixmap,QIcon::Disabled,QIcon::On);
|
||||||
|
|
||||||
qint8 sizeVertical = 90;
|
float sizeVertical = 90;
|
||||||
quint16 sizeHorizontal = 150;
|
float sizeHorizontal = 150;
|
||||||
|
|
||||||
if(screens.length() > 3)
|
if(screens.length() > 3)
|
||||||
{
|
{
|
||||||
@@ -43,9 +43,9 @@ void ScreenChecker::check()
|
|||||||
(a->geometry().x() == b->geometry().x() && a->geometry().y() < b->geometry().y()); //выше
|
(a->geometry().x() == b->geometry().x() && a->geometry().y() < b->geometry().y()); //выше
|
||||||
});
|
});
|
||||||
|
|
||||||
for (int i = 0; i < screens.length() ;i++)
|
//int i = 0; i < screens.length() ;i++
|
||||||
|
for (auto display : screens)
|
||||||
{
|
{
|
||||||
QScreen *display = screens[i];
|
|
||||||
screenCount++;
|
screenCount++;
|
||||||
|
|
||||||
QString sizeText = QString::number(display->size().width()) + "x" + QString::number(display->size().height());
|
QString sizeText = QString::number(display->size().width()) + "x" + QString::number(display->size().height());
|
||||||
@@ -131,8 +131,8 @@ QString ScreenChecker::getScreenCount() const
|
|||||||
|
|
||||||
ScreenChecker::~ScreenChecker()
|
ScreenChecker::~ScreenChecker()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < buttons.size(); i++)
|
for (auto & button : buttons)
|
||||||
{
|
{
|
||||||
delete buttons[i];
|
delete button;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ class ScreenChecker : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ScreenChecker(QWidget *widget,DataParserOutput *dataParserOutput, QHBoxLayout *layout,QObject *parent = nullptr);
|
explicit ScreenChecker(QWidget *mainWidget,DataParserOutput *dataParserOutput, QHBoxLayout *layout,QObject *parent = nullptr);
|
||||||
~ScreenChecker();
|
~ScreenChecker();
|
||||||
void check();
|
void check();
|
||||||
QString getScreenCount() const;
|
QString getScreenCount() const;
|
||||||
@@ -30,7 +30,6 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
QWidget *mainWidget;
|
QWidget *mainWidget;
|
||||||
QWidget *widget;
|
|
||||||
DataParserOutput *dataParserOutput;
|
DataParserOutput *dataParserOutput;
|
||||||
QHBoxLayout *layout;
|
QHBoxLayout *layout;
|
||||||
qint64 screenCount;
|
qint64 screenCount;
|
||||||
|
|||||||
@@ -1,13 +1,16 @@
|
|||||||
#include "sendsystem.h"
|
#include "sendsystem.h"
|
||||||
|
|
||||||
SendSystem::SendSystem(QObject *) {}
|
SendSystem::SendSystem(QObject *parent) :
|
||||||
|
QObject(parent),
|
||||||
|
socket(nullptr),
|
||||||
|
readSize(1025*250){}
|
||||||
|
|
||||||
void SendSystem::setSocket(QTcpSocket *socket)
|
void SendSystem::setSocket(QTcpSocket *socket)
|
||||||
{
|
{
|
||||||
this->socket = socket;
|
this->socket = socket;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SendSystem::xmlAnswer(QString message)
|
void SendSystem::xmlAnswer(const QString& message)
|
||||||
{
|
{
|
||||||
QDataStream stream(socket);
|
QDataStream stream(socket);
|
||||||
stream.setVersion(QDataStream::Qt_DefaultCompiledVersion);
|
stream.setVersion(QDataStream::Qt_DefaultCompiledVersion);
|
||||||
@@ -40,7 +43,7 @@ void SendSystem::sendClientAutorization()
|
|||||||
file.close();
|
file.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SendSystem::sendFileBlock(QString path)
|
void SendSystem::sendFileBlock(const QString& path)
|
||||||
{
|
{
|
||||||
QDataStream stream(socket);
|
QDataStream stream(socket);
|
||||||
stream.setVersion(QDataStream::Qt_DefaultCompiledVersion);
|
stream.setVersion(QDataStream::Qt_DefaultCompiledVersion);
|
||||||
@@ -62,7 +65,7 @@ void SendSystem::sendFileBlock(QString path)
|
|||||||
|
|
||||||
if(file.open(QFile::ReadOnly)){
|
if(file.open(QFile::ReadOnly)){
|
||||||
while(!file.atEnd()){
|
while(!file.atEnd()){
|
||||||
QByteArray data = file.read(1025*250);
|
QByteArray data = file.read(readSize);
|
||||||
stream << data;
|
stream << data;
|
||||||
socket->waitForBytesWritten(20);
|
socket->waitForBytesWritten(20);
|
||||||
countSend++;
|
countSend++;
|
||||||
@@ -74,13 +77,11 @@ void SendSystem::sendFileBlock(QString path)
|
|||||||
file.close();
|
file.close();
|
||||||
|
|
||||||
emit sigSend();
|
emit sigSend();
|
||||||
//qDebug() << "Transaction after send file: " << socket->isTransactionStarted();
|
|
||||||
countSend = 0;
|
countSend = 0;
|
||||||
//socket->waitForBytesWritten();
|
|
||||||
socket->waitForReadyRead(20);
|
socket->waitForReadyRead(20);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SendSystem::sendFolderBlock(QString path)
|
void SendSystem::sendFolderBlock(const QString& path)
|
||||||
{
|
{
|
||||||
QDataStream stream(socket);
|
QDataStream stream(socket);
|
||||||
stream.setVersion(QDataStream::Qt_DefaultCompiledVersion);
|
stream.setVersion(QDataStream::Qt_DefaultCompiledVersion);
|
||||||
@@ -91,11 +92,10 @@ void SendSystem::sendFolderBlock(QString path)
|
|||||||
socket->waitForReadyRead(100);
|
socket->waitForReadyRead(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SendSystem::sendFileBlockWithVersion(QString localPath,QString serverPath)
|
void SendSystem::sendFileBlockWithVersion(const QString& localPath,const QString& serverPath)
|
||||||
{
|
{
|
||||||
QDataStream stream(socket);
|
QDataStream stream(socket);
|
||||||
stream.setVersion(QDataStream::Qt_DefaultCompiledVersion);
|
stream.setVersion(QDataStream::Qt_DefaultCompiledVersion);
|
||||||
//QString fullPath = Tools::createLocalPath(localPath);
|
|
||||||
quint64 fileSize = 0;
|
quint64 fileSize = 0;
|
||||||
int countSend = 0;
|
int countSend = 0;
|
||||||
|
|
||||||
@@ -109,11 +109,10 @@ void SendSystem::sendFileBlockWithVersion(QString localPath,QString serverPath)
|
|||||||
stream << serverPath << fileSize;
|
stream << serverPath << fileSize;
|
||||||
|
|
||||||
socket->waitForReadyRead(20);
|
socket->waitForReadyRead(20);
|
||||||
//socket->waitForBytesWritten();
|
|
||||||
|
|
||||||
if(file.open(QFile::ReadOnly)){
|
if(file.open(QFile::ReadOnly)){
|
||||||
while(!file.atEnd()){
|
while(!file.atEnd()){
|
||||||
QByteArray data = file.read(1025*250);
|
QByteArray data = file.read(readSize);
|
||||||
stream << data;
|
stream << data;
|
||||||
socket->waitForBytesWritten(10);
|
socket->waitForBytesWritten(10);
|
||||||
countSend++;
|
countSend++;
|
||||||
@@ -133,8 +132,7 @@ void SendSystem::sendFileBlockWithVersion(QString localPath,QString serverPath)
|
|||||||
|
|
||||||
void SendSystem::sendQTConnect()
|
void SendSystem::sendQTConnect()
|
||||||
{
|
{
|
||||||
//QString value = QString::number(PacketType::TYPE_QT);
|
QByteArray container; //TODO найти более компактное решение
|
||||||
QByteArray container;
|
|
||||||
int numPackage = (int)PacketType::TYPE_QT;
|
int numPackage = (int)PacketType::TYPE_QT;
|
||||||
container.append(numPackage & 0x000000ff);
|
container.append(numPackage & 0x000000ff);
|
||||||
container.append((numPackage >> 8) & 0x000000ff);
|
container.append((numPackage >> 8) & 0x000000ff);
|
||||||
@@ -145,7 +143,7 @@ void SendSystem::sendQTConnect()
|
|||||||
socket->waitForBytesWritten();
|
socket->waitForBytesWritten();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SendSystem::sendXMLAnswer(QByteArray array)
|
void SendSystem::sendXMLAnswer(const QByteArray& array)
|
||||||
{
|
{
|
||||||
QDataStream stream(socket);
|
QDataStream stream(socket);
|
||||||
stream.setVersion(QDataStream::Qt_DefaultCompiledVersion);
|
stream.setVersion(QDataStream::Qt_DefaultCompiledVersion);
|
||||||
@@ -189,19 +187,18 @@ void SendSystem::sendDeleteVersion(StreamingVersionData *streamingVersion)
|
|||||||
socket->waitForReadyRead(100);
|
socket->waitForReadyRead(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SendSystem::sendCopyVersion(QString streamingVersion)
|
void SendSystem::sendCopyVersion(const QString& versionName)
|
||||||
{
|
{
|
||||||
QDataStream stream(socket);
|
QDataStream stream(socket);
|
||||||
stream.setVersion(QDataStream::Qt_DefaultCompiledVersion);
|
stream.setVersion(QDataStream::Qt_DefaultCompiledVersion);
|
||||||
stream << PacketType::COPY_VERSION;
|
stream << PacketType::COPY_VERSION;
|
||||||
|
|
||||||
stream << streamingVersion;
|
stream << versionName;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SendSystem::sendPacketType(PacketType packetType)
|
void SendSystem::sendPacketType(PacketType packetType)
|
||||||
{
|
{
|
||||||
QDataStream stream(socket);
|
QDataStream stream(socket);
|
||||||
QByteArray data;
|
|
||||||
stream.setVersion(QDataStream::Qt_DefaultCompiledVersion);
|
stream.setVersion(QDataStream::Qt_DefaultCompiledVersion);
|
||||||
|
|
||||||
stream << packetType;
|
stream << packetType;
|
||||||
@@ -210,7 +207,6 @@ void SendSystem::sendPacketType(PacketType packetType)
|
|||||||
void SendSystem::sendCheckHash()
|
void SendSystem::sendCheckHash()
|
||||||
{
|
{
|
||||||
QDataStream stream(socket);
|
QDataStream stream(socket);
|
||||||
QByteArray data;
|
|
||||||
stream.setVersion(QDataStream::Qt_DefaultCompiledVersion);
|
stream.setVersion(QDataStream::Qt_DefaultCompiledVersion);
|
||||||
|
|
||||||
sendFileBlock(staticDataFolderName + hashFilename);
|
sendFileBlock(staticDataFolderName + hashFilename);
|
||||||
@@ -218,8 +214,3 @@ void SendSystem::sendCheckHash()
|
|||||||
socket->waitForReadyRead(2000);
|
socket->waitForReadyRead(2000);
|
||||||
stream << PacketType::TYPE_CHECK_VERSION;
|
stream << PacketType::TYPE_CHECK_VERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
SendSystem::~SendSystem()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -17,27 +17,28 @@ public:
|
|||||||
void setSocket(QTcpSocket *socket);
|
void setSocket(QTcpSocket *socket);
|
||||||
void sendClientAutorization();
|
void sendClientAutorization();
|
||||||
void sendDisable();
|
void sendDisable();
|
||||||
void sendFileBlock(QString path);
|
void sendFileBlock(const QString& path);
|
||||||
void sendFolderBlock(QString path);
|
void sendFolderBlock(const QString& path);
|
||||||
void sendFileBlockWithVersion(QString localPath, QString serverPath);
|
void sendFileBlockWithVersion(const QString& localPath,const QString& serverPath);
|
||||||
void sendQTConnect();
|
void sendQTConnect();
|
||||||
void sendXMLAnswer(QByteArray array);
|
void sendXMLAnswer(const QByteArray& array);
|
||||||
void sendFinish();
|
void sendFinish();
|
||||||
void sendChangeVersion(StreamingVersionData *streamingVersion);
|
void sendChangeVersion(StreamingVersionData *streamingVersion);
|
||||||
void sendDeleteVersion(StreamingVersionData *streamingVersion);
|
void sendDeleteVersion(StreamingVersionData *streamingVersion);
|
||||||
void sendCopyVersion(QString versionName);
|
void sendCopyVersion(const QString& versionName);
|
||||||
void sendCheckHash();
|
void sendCheckHash();
|
||||||
void sendPacketType(PacketType packetType);
|
void sendPacketType(PacketType packetType);
|
||||||
|
|
||||||
~SendSystem();
|
~SendSystem(){};
|
||||||
signals:
|
signals:
|
||||||
void sigSend();
|
void sigSend();
|
||||||
QByteArray sigGetXmlAnswer(QString);
|
QByteArray sigGetXmlAnswer(QString);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void xmlAnswer(QString message);
|
void xmlAnswer(const QString& message);
|
||||||
private:
|
private:
|
||||||
QTcpSocket *socket;
|
QTcpSocket *socket;
|
||||||
|
int readSize;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,17 @@
|
|||||||
#include "tcpclient.h"
|
#include "tcpclient.h"
|
||||||
|
|
||||||
TCPClient::TCPClient(QObject *parent) :
|
TCPClient::TCPClient(QObject *parent) :
|
||||||
QObject(parent)
|
QObject(parent),
|
||||||
|
sendSystem(nullptr),
|
||||||
|
socket(nullptr),
|
||||||
|
recognizeSystem(nullptr),
|
||||||
|
isConnected(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void TCPClient::initialize(RecognizeSystem *recognize,ExternalExecuter *externalExecuter,SendSystem *sendSystem)
|
void TCPClient::initialize(RecognizeSystem *recognize,SendSystem *sendSystem)
|
||||||
{
|
{
|
||||||
this->recognizeSystem = recognize;
|
this->recognizeSystem = recognize;
|
||||||
this->externalExecuter = externalExecuter;
|
|
||||||
this->sendSystem = sendSystem;
|
this->sendSystem = sendSystem;
|
||||||
isConnected = false;
|
isConnected = false;
|
||||||
|
|
||||||
@@ -21,7 +24,7 @@ void TCPClient::setConnect(ServerSettings *serverSettings)
|
|||||||
{
|
{
|
||||||
socket = new QTcpSocket();
|
socket = new QTcpSocket();
|
||||||
qDebug() << "TCPCLient thread: " << thread();
|
qDebug() << "TCPCLient thread: " << thread();
|
||||||
if (socket != NULL && socket->state() == QTcpSocket::ConnectedState)
|
if (socket != nullptr && socket->state() == QTcpSocket::ConnectedState)
|
||||||
{
|
{
|
||||||
emit sigSendDebugLog("already connected");
|
emit sigSendDebugLog("already connected");
|
||||||
return;
|
return;
|
||||||
@@ -74,7 +77,6 @@ void TCPClient::slotConnectNotify()
|
|||||||
isConnected = false;
|
isConnected = false;
|
||||||
emit sigSendDebugLog("Connect invalid");
|
emit sigSendDebugLog("Connect invalid");
|
||||||
emit sigConnectionState(false);
|
emit sigConnectionState(false);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -99,8 +101,3 @@ bool TCPClient::getIsConnected() const
|
|||||||
{
|
{
|
||||||
return isConnected;
|
return isConnected;
|
||||||
}
|
}
|
||||||
|
|
||||||
TCPClient::~TCPClient()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -26,12 +26,12 @@ class TCPClient : public QObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit TCPClient(QObject *parent = 0);
|
explicit TCPClient(QObject *parent = 0);
|
||||||
void initialize(RecognizeSystem *recognize,ExternalExecuter *externalExecuter,SendSystem *sendSystem);
|
void initialize(RecognizeSystem *recognize,SendSystem *sendSystem);
|
||||||
void setConnect(ServerSettings *serverSettings);
|
void setConnect(ServerSettings *serverSettings);
|
||||||
|
|
||||||
void waitRead(int time);
|
void waitRead(int time);
|
||||||
QTcpSocket* getSocket();
|
QTcpSocket* getSocket();
|
||||||
~TCPClient();
|
~TCPClient(){};
|
||||||
|
|
||||||
bool getIsConnected() const;
|
bool getIsConnected() const;
|
||||||
|
|
||||||
@@ -51,7 +51,6 @@ private:
|
|||||||
SendSystem *sendSystem;
|
SendSystem *sendSystem;
|
||||||
QTcpSocket *socket;
|
QTcpSocket *socket;
|
||||||
RecognizeSystem *recognizeSystem;
|
RecognizeSystem *recognizeSystem;
|
||||||
ExternalExecuter * externalExecuter;
|
|
||||||
bool isConnected;
|
bool isConnected;
|
||||||
|
|
||||||
void setDisconnect();
|
void setDisconnect();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
<ServerSettingsContainer>
|
<ServerSettingsContainer>
|
||||||
<ServerSettings DestPortMath="18003" AutoStart="0" Language="RUS" UseMathModel="1" Port="6000" LocalPortMath="18004" Address="192.168.100.83"/>
|
<ServerSettings Language="RUS" Port="6000" Address="192.168.100.83" AutoStart="0" UseMathModel="1" DestPortMath="18003" LocalPortMath="18004"/>
|
||||||
<VersionData Version="base" Created="Пт авг 8 13:27:27 2025" isChangable="0"/>
|
<VersionData Version="base" isChangable="0" Created="Пт авг 8 13:27:27 2025"/>
|
||||||
</ServerSettingsContainer>
|
</ServerSettingsContainer>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ CommonButtonGroupWidget::CommonButtonGroupWidget(QWidget *parent) :
|
|||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CommonButtonGroupWidget::initialize(ExternalExecuter *extExec,SendSystem *sendSystem,TCPClient *client)
|
void CommonButtonGroupWidget::initialize(ExternalExecuter *extExec,SendSystem *sendSystem)
|
||||||
{
|
{
|
||||||
externalExecuter = extExec;
|
externalExecuter = extExec;
|
||||||
this->sendSystem = sendSystem;
|
this->sendSystem = sendSystem;
|
||||||
@@ -70,7 +70,6 @@ void CommonButtonGroupWidget::needUpdateState(bool flag)
|
|||||||
{
|
{
|
||||||
ui->startButton->hide();
|
ui->startButton->hide();
|
||||||
ui->updateButton->setEnabled(flag);
|
ui->updateButton->setEnabled(flag);
|
||||||
//ui->startButton->setEnabled(externalExecuter->findApp());
|
|
||||||
ui->updateButton->show();
|
ui->updateButton->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ class CommonButtonGroupWidget : public QWidget
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit CommonButtonGroupWidget(QWidget *parent = nullptr);
|
explicit CommonButtonGroupWidget(QWidget *parent = nullptr);
|
||||||
void initialize(ExternalExecuter *extExec,SendSystem *sendSystem,TCPClient *client);
|
void initialize(ExternalExecuter *extExec,SendSystem *sendSystem);
|
||||||
void loadCompleteState();
|
void loadCompleteState();
|
||||||
void lastVerInstalledState();
|
void lastVerInstalledState();
|
||||||
void disconnectState();
|
void disconnectState();
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include <QFontDatabase>
|
#include <QFontDatabase>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QMovie>
|
#include <QMovie>
|
||||||
|
#include <QMutexLocker>
|
||||||
#include <QPaintEvent>
|
#include <QPaintEvent>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
@@ -25,10 +26,11 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
void MainWindow::createObjects()
|
void MainWindow::createObjects()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<PacketType>("PacketType");
|
qRegisterMetaType<PacketType>("PacketType");
|
||||||
|
|
||||||
|
|
||||||
updateWidget = new UpdateNotifyWidget;
|
updateWidget = new UpdateNotifyWidget;
|
||||||
|
|
||||||
|
QMutex *mutex = new QMutex;
|
||||||
|
QMutexLocker locker(mutex);
|
||||||
|
|
||||||
updateWidget->setParent(this);
|
updateWidget->setParent(this);
|
||||||
commonButtonGroupWidget = new CommonButtonGroupWidget;
|
commonButtonGroupWidget = new CommonButtonGroupWidget;
|
||||||
instructorButtonGroup = new InstructorButtonGroupWidget;
|
instructorButtonGroup = new InstructorButtonGroupWidget;
|
||||||
@@ -83,7 +85,7 @@ void MainWindow::createObjects()
|
|||||||
timer = new QTimer;
|
timer = new QTimer;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::paintEvent(QPaintEvent* event) {
|
void MainWindow::paintEvent(QPaintEvent*) {
|
||||||
QPainter painter(this);
|
QPainter painter(this);
|
||||||
painter.setRenderHint(QPainter::Antialiasing);
|
painter.setRenderHint(QPainter::Antialiasing);
|
||||||
|
|
||||||
@@ -114,7 +116,7 @@ void MainWindow::initialize()
|
|||||||
dataParser->initialize(postProcessorSystem);
|
dataParser->initialize(postProcessorSystem);
|
||||||
recognizeSystem->initialize(dataParser, versionContainer, postProcessorSystem);
|
recognizeSystem->initialize(dataParser, versionContainer, postProcessorSystem);
|
||||||
resourceManager->painting();
|
resourceManager->painting();
|
||||||
commonButtonGroupWidget->initialize(externalExecuter,sendSystem,client);
|
commonButtonGroupWidget->initialize(externalExecuter,sendSystem);
|
||||||
commonButtonGroupWidget->show();
|
commonButtonGroupWidget->show();
|
||||||
ui->LanguageWidget->hide();
|
ui->LanguageWidget->hide();
|
||||||
|
|
||||||
@@ -122,7 +124,7 @@ void MainWindow::initialize()
|
|||||||
|
|
||||||
setInlineDebug(tr("Инициализация..."));
|
setInlineDebug(tr("Инициализация..."));
|
||||||
emit sigCalculateHash();
|
emit sigCalculateHash();
|
||||||
emit sigInitializeClient(recognizeSystem,externalExecuter,sendSystem);
|
emit sigInitializeClient(recognizeSystem,sendSystem);
|
||||||
|
|
||||||
screenChecker->check();
|
screenChecker->check();
|
||||||
|
|
||||||
@@ -135,8 +137,6 @@ void MainWindow::initialize()
|
|||||||
ui->versionLayoutWidget->hide();
|
ui->versionLayoutWidget->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::bindConnection()
|
void MainWindow::bindConnection()
|
||||||
{
|
{
|
||||||
connect(timer,&QTimer::timeout,this,&MainWindow::slotDisableNotify);
|
connect(timer,&QTimer::timeout,this,&MainWindow::slotDisableNotify);
|
||||||
@@ -555,6 +555,8 @@ void MainWindow::on_exitButton_clicked()
|
|||||||
client->disconnect();
|
client->disconnect();
|
||||||
|
|
||||||
workerThread->quit();
|
workerThread->quit();
|
||||||
|
workerThread->wait();
|
||||||
|
|
||||||
delete workerThread;
|
delete workerThread;
|
||||||
delete ui;
|
delete ui;
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public:
|
|||||||
void showWarning(QString text);
|
void showWarning(QString text);
|
||||||
void setInlineDebug(QString value);
|
void setInlineDebug(QString value);
|
||||||
signals:
|
signals:
|
||||||
void sigInitializeClient(RecognizeSystem *recognize,ExternalExecuter *externalExecuter,SendSystem *sendSystem);
|
void sigInitializeClient(RecognizeSystem *recognize,SendSystem *sendSystem);
|
||||||
void sigRecognize(UpdateController* updateController,
|
void sigRecognize(UpdateController* updateController,
|
||||||
DataParser* dataParser,
|
DataParser* dataParser,
|
||||||
MainWindow* mainWindow,
|
MainWindow* mainWindow,
|
||||||
|
|||||||
Reference in New Issue
Block a user