mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJClient.git
synced 2026-03-28 05:25:39 +03:00
fead: load without animation
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#include "Core/recognizesystem.h"
|
||||
|
||||
#include <updatenotifywidget.h>
|
||||
|
||||
RecognizeSystem::RecognizeSystem(QObject *parent):
|
||||
QObject(parent)
|
||||
{
|
||||
@@ -17,15 +19,18 @@ RecognizeSystem::~RecognizeSystem()
|
||||
|
||||
}
|
||||
|
||||
void RecognizeSystem::initialize(UpdateController *updateController,DataParser *dataParser)
|
||||
void RecognizeSystem::initialize(UpdateController *updateController,DataParser *dataParser,MainWindow *mainWindow)
|
||||
{
|
||||
this->updateController = updateController;
|
||||
this->dataParser = dataParser;
|
||||
this->mainWindow = mainWindow;
|
||||
connect(this,&RecognizeSystem::sigSaveLoginData,dataParser,&DataParser::createAuthData);
|
||||
}
|
||||
|
||||
void RecognizeSystem::recognize(QTcpSocket *socket)
|
||||
{
|
||||
qDebug() << "RecognizeThreadId " << QThread::currentThreadId();
|
||||
|
||||
QDataStream stream(socket);
|
||||
stream.setVersion(QDataStream::Qt_DefaultCompiledVersion);
|
||||
|
||||
@@ -159,6 +164,7 @@ void RecognizeSystem::recognize(QTcpSocket *socket)
|
||||
|
||||
file.close();
|
||||
emit sigSendDebugLog(Tools::getTime() + "File loaded");
|
||||
emit
|
||||
|
||||
//ОЧИСТКА ПОСЛЕ ПЕРЕДАЧИ
|
||||
|
||||
@@ -204,7 +210,7 @@ void RecognizeSystem::recognize(QTcpSocket *socket)
|
||||
}
|
||||
|
||||
if(packetType ==PacketType::TYPE_FINISH){ //для повторного создания хэша после загрузки
|
||||
updateController->calculateHash();
|
||||
updateController->calculateCommonHash();
|
||||
emit sigLoadComplete();
|
||||
packetType = PacketType::TYPE_NONE;
|
||||
}
|
||||
@@ -273,6 +279,11 @@ void RecognizeSystem::xmlParser(QByteArray array)
|
||||
{
|
||||
emit sigServerBlocked();
|
||||
}
|
||||
|
||||
if(value == "HASHSENDCOMPLETE")
|
||||
{
|
||||
emit sigStartCompare();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -300,6 +311,7 @@ void RecognizeSystem::xmlParser(QByteArray array)
|
||||
|
||||
if (name == "AccessType"){
|
||||
serverAuth->AccessType = value;
|
||||
checkAccessType(value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -308,5 +320,13 @@ void RecognizeSystem::xmlParser(QByteArray array)
|
||||
|
||||
xmlReader.readNext();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void RecognizeSystem::checkAccessType(QString type)
|
||||
{
|
||||
if(type == "instructor")
|
||||
{
|
||||
updateController->calculateStreamingHash();
|
||||
mainWindow->callUpdateList();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user