refactoring

This commit is contained in:
semenov
2024-08-30 14:51:01 +03:00
parent 0c1ec67d4e
commit d805fc190a
45 changed files with 592 additions and 410 deletions

View File

@@ -8,7 +8,7 @@ UpdateController::UpdateController(DataParser *parser, QObject *parent) :
}
void UpdateController::CalculateHash()
void UpdateController::calculateHash()
{
qDebug() << "Try calculate";
@@ -51,13 +51,13 @@ void UpdateController::CalculateHash()
readSize = qMin(fileSize,bufferSize);
}
hashString = QString(hash.result().toHex());
currentFile.path = Tools::CreateLocalPath(fileInfo.absoluteFilePath());
currentFile.path = Tools::createLocalPath(fileInfo.absoluteFilePath());
currentFile.hash = hashString;
files->push_back(currentFile);
}
else if (fileInfo.isDir() && !fileInfo.isRoot() && fileInfo.fileName() != "..")
{
currentFile.path = Tools::CreateLocalPath(fileInfo.path());
currentFile.path = Tools::createLocalPath(fileInfo.path());
currentFile.hash = "FOLDER";
if(!folders->contains(currentFile)){
@@ -70,7 +70,7 @@ void UpdateController::CalculateHash()
fileDataList.append(*folders);
fileDataList.append(*files);
dataParser->CreateXML(fileDataList);
dataParser->createXML(fileDataList);
delete folders;
delete files;

View File

@@ -24,7 +24,7 @@ class UpdateController : public QObject
public:
explicit UpdateController(DataParser *parser,QObject *parent = 0);
void CalculateHash();
void calculateHash();
~UpdateController();
private:

View File

@@ -20,7 +20,7 @@ QByteArray DataParser::slotGetXmlAnswer(QString answerCode)
}
}
void DataParser::CreateXML(QList<FileData> fileDataList)
void DataParser::createXML(QList<FileData> fileDataList)
{
QFile file(hashFilename);
@@ -47,7 +47,7 @@ void DataParser::CreateXML(QList<FileData> fileDataList)
file.close();
}
void DataParser::CreateAuthMessage(ClientAutorization *auth)
void DataParser::createAuthMessage(ClientAutorization *auth)
{
authPassCache = auth; //кэширование даных авторизации, для сохранения при успешном заходе
@@ -71,7 +71,7 @@ void DataParser::CreateAuthMessage(ClientAutorization *auth)
void DataParser::CreateServerSettings(QString address, QString port)
void DataParser::createServerSettings(QString address, QString port)
{
QFile file(settingsName);
@@ -99,7 +99,7 @@ void DataParser::CreateServerSettings(QString address, QString port)
}
void DataParser::CreateAuthData(ServerAuthorization *serverAuth)
void DataParser::createAuthData(ServerAuthorization *serverAuth)
{
QFile file(authTempName);
file.open(QIODevice::WriteOnly);
@@ -134,7 +134,7 @@ QByteArray DataParser::xmlAnswer_notify(QString code)
return xmlAnswer(listTag);
}
void DataParser::AddRunData(QList<int> displays)
void DataParser::addRunData(QList<int> displays)
{
QFile file(displayTemp);
file.open(QIODevice::ReadWrite);
@@ -148,7 +148,7 @@ void DataParser::AddRunData(QList<int> displays)
}
ServerSettings *DataParser::GetServerSettings()
ServerSettings *DataParser::getServerSettings()
{
ServerSettings *settings = new ServerSettings;
QFile file(settingsName);

View File

@@ -16,13 +16,13 @@ class DataParser : public QObject
public:
explicit DataParser(QObject *parent = 0);
~DataParser();
ServerSettings* GetServerSettings();
void CreateServerSettings(QString server,QString port);
ServerSettings* getServerSettings();
void createServerSettings(QString server,QString port);
void saveClientSettrings(QString language,bool isAutoStart);
void CreateXML(QList<FileData> fileDataList);
void CreateAuthMessage(ClientAutorization *auth);
void CreateAuthData(ServerAuthorization *serverAuth);
void AddRunData(QList<int> displays);
void createXML(QList<FileData> fileDataList);
void createAuthMessage(ClientAutorization *auth);
void createAuthData(ServerAuthorization *serverAuth);
void addRunData(QList<int> displays);
QByteArray xmlAnswer_notify(QString code);
QByteArray xmlAnswer(QList<SXmlAnswerTag> listTag, QString elemUp1 = "", QString elemUp2 = "");

View File

@@ -13,7 +13,7 @@ ExternalExecuter::~ExternalExecuter()
}
void ExternalExecuter::CallApp()
void ExternalExecuter::callApp()
{
QProcess *myProcess = new QProcess(this);
QStringList args;
@@ -24,7 +24,7 @@ void ExternalExecuter::CallApp()
QCoreApplication::exit();
}
bool ExternalExecuter::FindApp()
bool ExternalExecuter::findApp()
{
QString localPath = QDir::currentPath() + "/Application";
QDirIterator iterator(localPath,QDirIterator::Subdirectories);

View File

@@ -14,8 +14,8 @@ class ExternalExecuter : public QObject
public:
ExternalExecuter();
void CallApp();
bool FindApp();
void callApp();
bool findApp();
~ExternalExecuter();
private:

View File

@@ -17,14 +17,14 @@ RecognizeSystem::~RecognizeSystem()
}
void RecognizeSystem::Initialize(UpdateController *updateController,DataParser *dataParser)
void RecognizeSystem::initialize(UpdateController *updateController,DataParser *dataParser)
{
this->updateController = updateController;
this->dataParser = dataParser;
connect(this,&RecognizeSystem::SaveLoginData,dataParser,&DataParser::CreateAuthData);
connect(this,&RecognizeSystem::sigSaveLoginData,dataParser,&DataParser::createAuthData);
}
void RecognizeSystem::Recognize(QTcpSocket *socket)
void RecognizeSystem::recognize(QTcpSocket *socket)
{
QDataStream stream(socket);
stream.setVersion(QDataStream::Qt_DefaultCompiledVersion);
@@ -37,10 +37,10 @@ void RecognizeSystem::Recognize(QTcpSocket *socket)
stream >> packetType;
if(!stream.commitTransaction()){
emit onSendDebugLog(Tools::GetTime() + " CLIENT: packetType - FAIL commitTransaction");
emit sigSendDebugLog(Tools::getTime() + " CLIENT: packetType - FAIL commitTransaction");
if(socket->waitForReadyRead(TCP_READ_TIMEOUT)){
emit onSendDebugLog("ERROR: PACKET TYPE READ TIMEOUT");
emit sigSendDebugLog("ERROR: PACKET TYPE READ TIMEOUT");
return;
}
continue;
@@ -58,7 +58,7 @@ void RecognizeSystem::Recognize(QTcpSocket *socket)
continue;
}
filePath = Tools::CreateFullPath(filePath);
filePath = Tools::createFullPath(filePath);
QDir dir(filePath);
if(!dir.exists()){
@@ -83,28 +83,28 @@ void RecognizeSystem::Recognize(QTcpSocket *socket)
stream >> fileSize;
if(!stream.commitTransaction()){
emit onSendDebugLog(Tools::GetTime() + "CLIENT: filePath, fileSize - FAIL commitTransaction");
emit sigSendDebugLog(Tools::getTime() + "CLIENT: filePath, fileSize - FAIL commitTransaction");
if (!socket->waitForReadyRead(TCP_READ_TIMEOUT)) {
emit onSendDebugLog(Tools::GetTime() + "CLIENT: ERROR! readyRead timeout - filePath, fileSize!!!");
emit sigSendDebugLog(Tools::getTime() + "CLIENT: ERROR! readyRead timeout - filePath, fileSize!!!");
return;
}
continue;
}
filePath = Tools::CreateFullPath(filePath);
filePath = Tools::createFullPath(filePath);
emit onSendDebugLog("CLIENT: filesize: " + QString::number(fileSize));
emit onSendDebugLog("CLIENT: filePath: " + filePath);
emit sigSendDebugLog("CLIENT: filesize: " + QString::number(fileSize));
emit sigSendDebugLog("CLIENT: filePath: " + filePath);
emit SocketWaitForReadyRead(100);
emit sigSocketWaitForReadyRead(100);
break;
}
//ПОЛУЧЕНИЕ САМОГО ФАЙЛА
emit onSendDebugLog(Tools::GetTime() + "AfterRead size and path BytesAvailable: " + socket->bytesAvailable());
emit sigSendDebugLog(Tools::getTime() + "AfterRead size and path BytesAvailable: " + socket->bytesAvailable());
//УКАЗАНИЕ ПУТИ ФАЙЛА
QFile file(filePath);
@@ -112,7 +112,7 @@ void RecognizeSystem::Recognize(QTcpSocket *socket)
if (file.exists())
{
file.remove(); //удаление файла, если он уже есть, но необходимо обновить
emit onSendDebugLog(Tools::GetTime() + "Delete exist file: " + filePath);
emit sigSendDebugLog(Tools::getTime() + "Delete exist file: " + filePath);
}
@@ -127,7 +127,7 @@ void RecognizeSystem::Recognize(QTcpSocket *socket)
if(!stream.commitTransaction()){
if(socket->state() == QAbstractSocket::UnconnectedState){
emit SockedDisabled();
emit sigSocketDisabled();
return;
}
if(socket->waitForReadyRead(TCP_READ_TIMEOUT)){
@@ -138,7 +138,7 @@ void RecognizeSystem::Recognize(QTcpSocket *socket)
}
quint64 toFile = file.write(tmpBlock);
emit onSendDebugLog(Tools::GetTime() + "CLIENT: toFile :" + toFile);
emit sigSendDebugLog(Tools::getTime() + "CLIENT: toFile :" + toFile);
sizeReceiveData += toFile;
countSend++;
@@ -146,16 +146,16 @@ void RecognizeSystem::Recognize(QTcpSocket *socket)
tmpBlock.clear();
if(sizeReceiveData == fileSize){
emit onSendDebugLog(Tools::GetTime() + "FINAL Count send: " + QString::number(countSend));
emit onSendDebugLog(Tools::GetTime() + "FINAL Size received: " + QString::number(sizeReceiveData));
emit onSendDebugLog(Tools::GetTime() + "FINAL File size" + QString::number(fileSize));
emit UpdateBytesAvailable(fileSize,sizeReceiveData);
emit sigSendDebugLog(Tools::getTime() + "FINAL Count send: " + QString::number(countSend));
emit sigSendDebugLog(Tools::getTime() + "FINAL Size received: " + QString::number(sizeReceiveData));
emit sigSendDebugLog(Tools::getTime() + "FINAL File size" + QString::number(fileSize));
emit sigUpdateBytesAvailable(fileSize,sizeReceiveData);
break;
}
}
file.close();
emit onSendDebugLog(Tools::GetTime() + "File loaded");
emit sigSendDebugLog(Tools::getTime() + "File loaded");
//ОЧИСТКА ПОСЛЕ ПЕРЕДАЧИ
@@ -175,7 +175,7 @@ void RecognizeSystem::Recognize(QTcpSocket *socket)
continue;
}
filePath = Tools::CreateFullPath(filePath);
filePath = Tools::createFullPath(filePath);
QFileInfo fileInfo(filePath);
@@ -192,7 +192,7 @@ void RecognizeSystem::Recognize(QTcpSocket *socket)
dir.removeRecursively();
}
qDebug() << Tools::GetTime() << "Deleted: " << filePath;
qDebug() << Tools::getTime() << "Deleted: " << filePath;
}
packetType = PacketType::TYPE_NONE;
@@ -201,8 +201,8 @@ void RecognizeSystem::Recognize(QTcpSocket *socket)
}
if(packetType ==PacketType::TYPE_FINISH){ //для повторного создания хэша после загрузки
updateController->CalculateHash();
emit LoadComplete();
updateController->calculateHash();
emit sigLoadComplete();
packetType = PacketType::TYPE_NONE;
}
@@ -217,7 +217,7 @@ void RecognizeSystem::Recognize(QTcpSocket *socket)
stream >> size;
stream >> fileCount;
emit onNeedUpdate(flag,size,fileCount);
emit sigNeedUpdate(flag,size,fileCount);
packetType = PacketType::TYPE_NONE;
}
@@ -230,7 +230,7 @@ void RecognizeSystem::Recognize(QTcpSocket *socket)
continue;
}
XMLParser(array);
xmlParser(array);
packetType = PacketType::TYPE_NONE;
}
@@ -239,7 +239,7 @@ void RecognizeSystem::Recognize(QTcpSocket *socket)
}
}
void RecognizeSystem::XMLParser(QByteArray array)
void RecognizeSystem::xmlParser(QByteArray array)
{
QXmlStreamReader xmlReader(array);
@@ -262,7 +262,7 @@ void RecognizeSystem::XMLParser(QByteArray array)
if(name == "Code"){
if (value == "END"){
emit SockedDisabled();
emit sigSocketDisabled();
}
}
@@ -295,7 +295,7 @@ void RecognizeSystem::XMLParser(QByteArray array)
}
}
emit SaveLoginData(serverAuth);
emit sigSaveLoginData(serverAuth);
}
xmlReader.readNext();

View File

@@ -18,17 +18,17 @@ class RecognizeSystem : public QObject
public:
explicit RecognizeSystem(QObject *parent = 0);
~RecognizeSystem();
void Initialize(UpdateController* updateController,DataParser *dataParser);
void Recognize(QTcpSocket *socket);
void initialize(UpdateController* updateController,DataParser *dataParser);
void recognize(QTcpSocket *socket);
signals:
void UpdateBytesAvailable(qint64 size,quint64 sended);
void LoadComplete();
void onNeedUpdate(bool flag,qint64 size,quint64 fileCount);
void onSendDebugLog(QString message);
void SockedDisabled();
void SaveLoginData(ServerAuthorization *serverAuth);
void SocketWaitForReadyRead(int waitTime);
void sigUpdateBytesAvailable(qint64 size,quint64 sended);
void sigLoadComplete();
void sigNeedUpdate(bool flag,qint64 size,quint64 fileCount);
void sigSendDebugLog(QString message);
void sigSocketDisabled();
void sigSaveLoginData(ServerAuthorization *serverAuth);
void sigSocketWaitForReadyRead(int waitTime);
private:
UpdateController *updateController;
@@ -42,7 +42,7 @@ private:
qint64 fileSize;
int countSend;
void XMLParser(QByteArray array);
void xmlParser(QByteArray array);
};

View File

@@ -2,8 +2,6 @@
#include <QLabel>
ScreenChecker::ScreenChecker(DataParser *dataParser, QHBoxLayout *layout, QObject *parent) :
QObject(parent)
{
@@ -12,7 +10,7 @@ ScreenChecker::ScreenChecker(DataParser *dataParser, QHBoxLayout *layout, QObjec
this->dataParser = dataParser;
}
void ScreenChecker::Check()
void ScreenChecker::check()
{
screens = QGuiApplication::screens();
@@ -45,7 +43,7 @@ void ScreenChecker::Check()
button->setMaximumSize(*sizeResult);
button->setCheckable(true);
connect(button,&QPushButton::clicked,this,&ScreenChecker::UpdateDisplayData);
connect(button,&QPushButton::clicked,this,&ScreenChecker::updateDisplayData);
if(i == 0){
button->setChecked(true);
@@ -59,10 +57,10 @@ void ScreenChecker::Check()
}
UpdateDisplayData();
updateDisplayData();
}
void ScreenChecker::UpdateDisplayData()
void ScreenChecker::updateDisplayData()
{
QList<int> *displays = new QList<int>;
@@ -73,24 +71,7 @@ void ScreenChecker::UpdateDisplayData()
}
}
dataParser->AddRunData(*displays);
}
void ScreenChecker::hide()
{
for (int i = 0; i <buttons.count();i++)
{
buttons[i]->hide();
}
}
void ScreenChecker::show()
{
for (int i = 0; i <buttons.count();i++)
{
buttons[i]->show();
}
dataParser->addRunData(*displays);
}
QString ScreenChecker::getScreenCount() const

View File

@@ -17,10 +17,7 @@ class ScreenChecker : public QObject
public:
explicit ScreenChecker(DataParser *dataParser, QHBoxLayout *layout,QObject *parent = nullptr);
~ScreenChecker();
void Check();
void UpdateDisplayData();
void hide();
void show();
void check();
QString getScreenCount() const;
@@ -31,6 +28,8 @@ private:
qint64 screenCount;
QList<QScreen *> screens;
QList<QPushButton *> buttons;
void updateDisplayData();
};
#endif // SCREENCHECKER_H

View File

@@ -10,50 +10,50 @@ TCPClient::TCPClient(QObject *parent) :
socket = NULL;
}
void TCPClient::Initialize(RecognizeSystem *recognize,ExternalExecuter *externalExecuter)
void TCPClient::initialize(RecognizeSystem *recognize,ExternalExecuter *externalExecuter)
{
this->recognizeSystem = recognize;
this->externalExecuter = externalExecuter;
emit onSendDebugLog(Tools::GetTime() + " Client started");
emit sigSendDebugLog(Tools::GetTime() + " Client started");
}
void TCPClient::SetConnect(ServerSettings *serverSettings)
void TCPClient::setConnect(ServerSettings *serverSettings)
{
if (socket != NULL && socket->state() == QTcpSocket::ConnectedState)
{
emit onSendDebugLog("already connected");
emit sigSendDebugLog("already connected");
return;
}
socket = new QTcpSocket(this);
connect(socket,&QTcpSocket::readyRead,this,&TCPClient::onReadyRead,Qt::DirectConnection);
connect(socket,&QTcpSocket::disconnected,this,&TCPClient::SetDisconnect);
connect(this,&TCPClient::Recognize,recognizeSystem,&RecognizeSystem::Recognize,Qt::DirectConnection);
connect(socket,&QTcpSocket::readyRead,this,&TCPClient::slotReadyRead,Qt::DirectConnection);
connect(socket,&QTcpSocket::disconnected,this,&TCPClient::setDisconnect);
connect(this,&TCPClient::sigRecognize,recognizeSystem,&RecognizeSystem::recognize,Qt::DirectConnection);
socket->connectToHost(serverSettings->Address,serverSettings->Port.toShort());
emit onSendDebugLog("Try connect...");
emit sigSendDebugLog("Try connect...");
socket->waitForReadyRead();
if(socket->state() != QTcpSocket::ConnectedState){
emit onSendDebugLog("Connect invalid");
emit ConnectionState(false);
emit sigSendDebugLog("Connect invalid");
emit sigConnectionState(false);
return;
}else{
emit onSendDebugLog("Connect complete");
emit ConnectionState(true);
emit sigSendDebugLog("Connect complete");
emit sigConnectionState(true);
}
}
void TCPClient::SendClientAutorization()
void TCPClient::sendClientAutorization()
{
QDataStream stream(socket);
stream.setVersion(QDataStream::Qt_DefaultCompiledVersion);
if(socket->state() != QTcpSocket::ConnectedState){
emit ConnectionState(false);
emit sigConnectionState(false);
return;
}
@@ -66,7 +66,7 @@ void TCPClient::SendClientAutorization()
socket->waitForBytesWritten();
}
void TCPClient::SendFile()
void TCPClient::sendFile()
{
QDataStream stream(socket);
stream.setVersion(QDataStream::Qt_DefaultCompiledVersion);
@@ -97,7 +97,7 @@ void TCPClient::SendFile()
countSend = 0;
}
void TCPClient::SendUnityConnect()
void TCPClient::sendUnityConnect()
{
QDataStream stream(socket);
stream.setVersion(QDataStream::Qt_DefaultCompiledVersion);
@@ -105,10 +105,10 @@ void TCPClient::SendUnityConnect()
socket->waitForBytesWritten();
}
void TCPClient::SetDisconnect()
void TCPClient::setDisconnect()
{
socket->disconnect();
emit onSendDebugLog("Server disabled");
emit sigSendDebugLog("Server disabled");
}
void TCPClient::sendDisable()
@@ -117,29 +117,24 @@ void TCPClient::sendDisable()
stream.setVersion(QDataStream::Qt_DefaultCompiledVersion);
QByteArray data;
data = emit signalGetXmlAnswer("END");
data = emit sigGetXmlAnswer("END");
stream << PacketType::TYPE_XMLANSWER;
stream << data;
waitWrites();
}
void TCPClient::waitWrites()
{
socket->waitForBytesWritten();
}
void TCPClient::WaitRead(int time)
void TCPClient::waitRead(int time)
{
socket->waitForReadyRead(time);
}
QTcpSocket *TCPClient::GetSocket()
QTcpSocket *TCPClient::getSocket()
{
return socket;
}
void TCPClient::MessageEntered(QString message)
void TCPClient::slotMessageEntered(QString message)
{
QDataStream stream(socket);
QByteArray data;
@@ -153,36 +148,36 @@ void TCPClient::MessageEntered(QString message)
stream << message;
socket->waitForBytesWritten();
SendFile();
emit onSendDebugLog(Tools::GetTime() + " Local checkFile sended");
sendFile();
emit sigSendDebugLog(Tools::GetTime() + " Local checkFile sended");
socket->waitForReadyRead(1000);
}
else if(message == "update"){
emit onSendDebugLog("Update started");
emit sigSendDebugLog("Update started");
stream << PacketType::TYPE_COMMAND;
stream << message;
socket->waitForBytesWritten();
}
else if(message == "run"){
externalExecuter->CallApp();
externalExecuter->callApp();
}
}else{
emit onSendDebugLog("WRONG SOCKET AFTER ENTERED");
emit sigSendDebugLog("WRONG SOCKET AFTER ENTERED");
}
}
void TCPClient::onReadyRead()
void TCPClient::slotReadyRead()
{
if(!socket){
emit onSendDebugLog("WRONG SOCKET");
emit sigSendDebugLog("WRONG SOCKET");
return;
}
// qDebug() << "Transaction before recognize: " << socket->isTransactionStarted();
// if(socket->isTransactionStarted()) return;
emit Recognize(socket);
emit sigRecognize(socket);
}
TCPClient::~TCPClient()

View File

@@ -23,34 +23,35 @@ class TCPClient : public QObject
public:
explicit TCPClient(QObject *parent = 0);
void Initialize(RecognizeSystem *recognize,ExternalExecuter *externalExecuter);
void SetConnect(ServerSettings *serverSettings);
void SendClientAutorization();
void SendFile();
void SendUnityConnect();
void SetDisconnect();
void initialize(RecognizeSystem *recognize,ExternalExecuter *externalExecuter);
void setConnect(ServerSettings *serverSettings);
void sendClientAutorization();
void sendUnityConnect();
void sendDisable();
void waitWrites();
void WaitRead(int time);
QTcpSocket* GetSocket();
void waitRead(int time);
QTcpSocket* getSocket();
~TCPClient();
signals:
void onSendDebugLog(QString message);
void Recognize(QTcpSocket *socket);
void ConnectionState(bool flag);
QByteArray signalGetXmlAnswer(QString);
void sigSendDebugLog(QString message);
void sigRecognize(QTcpSocket *socket);
void sigConnectionState(bool flag);
QByteArray sigGetXmlAnswer(QString);
public slots:
void MessageEntered(QString message);
void slotMessageEntered(QString message);
private slots:
void onReadyRead();
void slotReadyRead();
private:
QTcpSocket *socket;
RecognizeSystem *recognizeSystem;
ExternalExecuter * externalExecuter;
void sendFile();
void setDisconnect();
};
#endif // TCPCLIENT_H

View File

@@ -3,17 +3,17 @@
#include <qdir.h>
void Tools::PrintTime()
void Tools::printTime()
{
qDebug() << QTime::currentTime().toString("hh:mm:ss");
}
QString Tools::GetTime()
QString Tools::getTime()
{
return QTime::currentTime().toString(("hh:mm:ss"));
}
QString Tools::CreateLocalPath(QString path)
QString Tools::createLocalPath(QString path)
{
qDebug() << "Full path: " << path;
qint8 pos = path.indexOf("Application");
@@ -24,7 +24,7 @@ QString Tools::CreateLocalPath(QString path)
return localPath;
}
QString Tools::CreateFullPath(QString path)
QString Tools::createFullPath(QString path)
{
QString fullPath;
qint8 pos = path.indexOf("Application");

View File

@@ -29,10 +29,10 @@ enum PacketType{
class Tools {
public:
static void PrintTime();
static QString GetTime();
static QString CreateLocalPath(QString path);
static QString CreateFullPath(QString path);
static void printTime();
static QString getTime();
static QString createLocalPath(QString path);
static QString createFullPath(QString path);
static QString convertFileSize(quint64 fileSize);
};

View File

@@ -278,7 +278,8 @@ Makefile: RRJClient.pro D:/QT/5.14.2/mingw73_64/mkspecs/win32-g++/qmake.conf D:/
D:/QT/5.14.2/mingw73_64/lib/Qt5Network.prl \
D:/QT/5.14.2/mingw73_64/lib/Qt5Core.prl \
D:/QT/5.14.2/mingw73_64/lib/qtmain.prl \
D:/QT/5.14.2/mingw73_64/mkspecs/features/build_pass.prf
D:/QT/5.14.2/mingw73_64/mkspecs/features/build_pass.prf \
resources.qrc
$(QMAKE) -o Makefile RRJClient.pro -spec win32-g++ "CONFIG+=debug" "CONFIG+=qml_debug"
D:/QT/5.14.2/mingw73_64/mkspecs/features/spec_pre.prf:
D:/QT/5.14.2/mingw73_64/mkspecs/qdevice.pri:
@@ -489,6 +490,7 @@ D:/QT/5.14.2/mingw73_64/lib/Qt5Network.prl:
D:/QT/5.14.2/mingw73_64/lib/Qt5Core.prl:
D:/QT/5.14.2/mingw73_64/lib/qtmain.prl:
D:/QT/5.14.2/mingw73_64/mkspecs/features/build_pass.prf:
resources.qrc:
qmake: FORCE
@$(QMAKE) -o Makefile RRJClient.pro -spec win32-g++ "CONFIG+=debug" "CONFIG+=qml_debug"

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -49,3 +49,6 @@ TRANSLATIONS = QtLanguage_ru.ts\
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
RESOURCES += \
resources.qrc

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.11.1, 2024-08-29T11:49:46. -->
<!-- Written by QtCreator 4.11.1, 2024-08-29T18:07:33. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<ServerSettingsContainer>
<ServerSettings Address="127.0.0.17" Port="6000" Language="ENG" AutoStart="1"/>
<ServerSettings Address="127.0.0.17" Port="6000" Language="RUS" AutoStart="1"/>
</ServerSettingsContainer>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -23,7 +23,7 @@ QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_MainWindow_t {
QByteArrayData data[25];
char stringdata0[426];
char stringdata0[439];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
@@ -33,44 +33,46 @@ struct qt_meta_stringdata_MainWindow_t {
static const qt_meta_stringdata_MainWindow_t qt_meta_stringdata_MainWindow = {
{
QT_MOC_LITERAL(0, 0, 10), // "MainWindow"
QT_MOC_LITERAL(1, 11, 18), // "onInitializeClient"
QT_MOC_LITERAL(2, 30, 0), // ""
QT_MOC_LITERAL(3, 31, 16), // "RecognizeSystem*"
QT_MOC_LITERAL(4, 48, 15), // "recognizeSystem"
QT_MOC_LITERAL(5, 64, 17), // "ExternalExecuter*"
QT_MOC_LITERAL(6, 82, 16), // "externalExecuter"
QT_MOC_LITERAL(7, 99, 12), // "onSetConnect"
QT_MOC_LITERAL(8, 112, 15), // "ServerSettings*"
QT_MOC_LITERAL(9, 128, 14), // "serverSettings"
QT_MOC_LITERAL(10, 143, 15), // "onCalculateHash"
QT_MOC_LITERAL(11, 159, 23), // "SendClientAuthorization"
QT_MOC_LITERAL(12, 183, 13), // "onSendMessage"
QT_MOC_LITERAL(13, 197, 7), // "message"
QT_MOC_LITERAL(14, 205, 22), // "on_loginButton_clicked"
QT_MOC_LITERAL(15, 228, 23), // "on_updateButton_clicked"
QT_MOC_LITERAL(16, 252, 22), // "on_startButton_clicked"
QT_MOC_LITERAL(17, 275, 27), // "on_saveServerButton_clicked"
QT_MOC_LITERAL(18, 303, 25), // "on_settingsButton_clicked"
QT_MOC_LITERAL(19, 329, 13), // "disableNotify"
QT_MOC_LITERAL(20, 343, 17), // "onConnectionState"
QT_MOC_LITERAL(21, 361, 4), // "flag"
QT_MOC_LITERAL(22, 366, 24), // "on_connectButton_clicked"
QT_MOC_LITERAL(23, 391, 29), // "on_languageComboBox_activated"
QT_MOC_LITERAL(24, 421, 4) // "arg1"
QT_MOC_LITERAL(1, 11, 19), // "sigInitializeClient"
QT_MOC_LITERAL(2, 31, 0), // ""
QT_MOC_LITERAL(3, 32, 16), // "RecognizeSystem*"
QT_MOC_LITERAL(4, 49, 15), // "recognizeSystem"
QT_MOC_LITERAL(5, 65, 17), // "ExternalExecuter*"
QT_MOC_LITERAL(6, 83, 16), // "externalExecuter"
QT_MOC_LITERAL(7, 100, 13), // "sigSetConnect"
QT_MOC_LITERAL(8, 114, 15), // "ServerSettings*"
QT_MOC_LITERAL(9, 130, 14), // "serverSettings"
QT_MOC_LITERAL(10, 145, 16), // "sigCalculateHash"
QT_MOC_LITERAL(11, 162, 26), // "sigSendClientAuthorization"
QT_MOC_LITERAL(12, 189, 14), // "sigSendMessage"
QT_MOC_LITERAL(13, 204, 7), // "message"
QT_MOC_LITERAL(14, 212, 22), // "on_loginButton_clicked"
QT_MOC_LITERAL(15, 235, 23), // "on_updateButton_clicked"
QT_MOC_LITERAL(16, 259, 22), // "on_startButton_clicked"
QT_MOC_LITERAL(17, 282, 27), // "on_saveServerButton_clicked"
QT_MOC_LITERAL(18, 310, 25), // "on_settingsButton_clicked"
QT_MOC_LITERAL(19, 336, 24), // "on_connectButton_clicked"
QT_MOC_LITERAL(20, 361, 29), // "on_languageComboBox_activated"
QT_MOC_LITERAL(21, 391, 4), // "arg1"
QT_MOC_LITERAL(22, 396, 17), // "slotDisableNotify"
QT_MOC_LITERAL(23, 414, 19), // "slotConnectionState"
QT_MOC_LITERAL(24, 434, 4) // "flag"
},
"MainWindow\0onInitializeClient\0\0"
"MainWindow\0sigInitializeClient\0\0"
"RecognizeSystem*\0recognizeSystem\0"
"ExternalExecuter*\0externalExecuter\0"
"onSetConnect\0ServerSettings*\0"
"serverSettings\0onCalculateHash\0"
"SendClientAuthorization\0onSendMessage\0"
"sigSetConnect\0ServerSettings*\0"
"serverSettings\0sigCalculateHash\0"
"sigSendClientAuthorization\0sigSendMessage\0"
"message\0on_loginButton_clicked\0"
"on_updateButton_clicked\0on_startButton_clicked\0"
"on_saveServerButton_clicked\0"
"on_settingsButton_clicked\0disableNotify\0"
"onConnectionState\0flag\0on_connectButton_clicked\0"
"on_languageComboBox_activated\0arg1"
"on_settingsButton_clicked\0"
"on_connectButton_clicked\0"
"on_languageComboBox_activated\0arg1\0"
"slotDisableNotify\0slotConnectionState\0"
"flag"
};
#undef QT_MOC_LITERAL
@@ -119,9 +121,9 @@ static const uint qt_meta_data_MainWindow[] = {
QMetaType::Void,
QMetaType::Void,
QMetaType::Void,
QMetaType::Void, QMetaType::Bool, 21,
QMetaType::Void, QMetaType::QString, 21,
QMetaType::Void,
QMetaType::Void, QMetaType::QString, 24,
QMetaType::Void, QMetaType::Bool, 24,
0 // eod
};
@@ -132,20 +134,20 @@ void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id,
auto *_t = static_cast<MainWindow *>(_o);
Q_UNUSED(_t)
switch (_id) {
case 0: _t->onInitializeClient((*reinterpret_cast< RecognizeSystem*(*)>(_a[1])),(*reinterpret_cast< ExternalExecuter*(*)>(_a[2]))); break;
case 1: _t->onSetConnect((*reinterpret_cast< ServerSettings*(*)>(_a[1]))); break;
case 2: _t->onCalculateHash(); break;
case 3: _t->SendClientAuthorization(); break;
case 4: _t->onSendMessage((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 0: _t->sigInitializeClient((*reinterpret_cast< RecognizeSystem*(*)>(_a[1])),(*reinterpret_cast< ExternalExecuter*(*)>(_a[2]))); break;
case 1: _t->sigSetConnect((*reinterpret_cast< ServerSettings*(*)>(_a[1]))); break;
case 2: _t->sigCalculateHash(); break;
case 3: _t->sigSendClientAuthorization(); break;
case 4: _t->sigSendMessage((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 5: _t->on_loginButton_clicked(); break;
case 6: _t->on_updateButton_clicked(); break;
case 7: _t->on_startButton_clicked(); break;
case 8: _t->on_saveServerButton_clicked(); break;
case 9: _t->on_settingsButton_clicked(); break;
case 10: _t->disableNotify(); break;
case 11: _t->onConnectionState((*reinterpret_cast< bool(*)>(_a[1]))); break;
case 12: _t->on_connectButton_clicked(); break;
case 13: _t->on_languageComboBox_activated((*reinterpret_cast< const QString(*)>(_a[1]))); break;
case 10: _t->on_connectButton_clicked(); break;
case 11: _t->on_languageComboBox_activated((*reinterpret_cast< const QString(*)>(_a[1]))); break;
case 12: _t->slotDisableNotify(); break;
case 13: _t->slotConnectionState((*reinterpret_cast< bool(*)>(_a[1]))); break;
default: ;
}
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
@@ -165,35 +167,35 @@ void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id,
int *result = reinterpret_cast<int *>(_a[0]);
{
using _t = void (MainWindow::*)(RecognizeSystem * , ExternalExecuter * );
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&MainWindow::onInitializeClient)) {
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&MainWindow::sigInitializeClient)) {
*result = 0;
return;
}
}
{
using _t = void (MainWindow::*)(ServerSettings * );
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&MainWindow::onSetConnect)) {
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&MainWindow::sigSetConnect)) {
*result = 1;
return;
}
}
{
using _t = void (MainWindow::*)();
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&MainWindow::onCalculateHash)) {
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&MainWindow::sigCalculateHash)) {
*result = 2;
return;
}
}
{
using _t = void (MainWindow::*)();
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&MainWindow::SendClientAuthorization)) {
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&MainWindow::sigSendClientAuthorization)) {
*result = 3;
return;
}
}
{
using _t = void (MainWindow::*)(QString );
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&MainWindow::onSendMessage)) {
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&MainWindow::sigSendMessage)) {
*result = 4;
return;
}
@@ -242,33 +244,33 @@ int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
}
// SIGNAL 0
void MainWindow::onInitializeClient(RecognizeSystem * _t1, ExternalExecuter * _t2)
void MainWindow::sigInitializeClient(RecognizeSystem * _t1, ExternalExecuter * _t2)
{
void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t1))), const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t2))) };
QMetaObject::activate(this, &staticMetaObject, 0, _a);
}
// SIGNAL 1
void MainWindow::onSetConnect(ServerSettings * _t1)
void MainWindow::sigSetConnect(ServerSettings * _t1)
{
void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t1))) };
QMetaObject::activate(this, &staticMetaObject, 1, _a);
}
// SIGNAL 2
void MainWindow::onCalculateHash()
void MainWindow::sigCalculateHash()
{
QMetaObject::activate(this, &staticMetaObject, 2, nullptr);
}
// SIGNAL 3
void MainWindow::SendClientAuthorization()
void MainWindow::sigSendClientAuthorization()
{
QMetaObject::activate(this, &staticMetaObject, 3, nullptr);
}
// SIGNAL 4
void MainWindow::onSendMessage(QString _t1)
void MainWindow::sigSendMessage(QString _t1)
{
void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t1))) };
QMetaObject::activate(this, &staticMetaObject, 4, _a);

Binary file not shown.

View File

@@ -23,7 +23,7 @@ QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_RecognizeSystem_t {
QByteArrayData data[17];
char stringdata0[207];
char stringdata0[224];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
@@ -33,30 +33,30 @@ struct qt_meta_stringdata_RecognizeSystem_t {
static const qt_meta_stringdata_RecognizeSystem_t qt_meta_stringdata_RecognizeSystem = {
{
QT_MOC_LITERAL(0, 0, 15), // "RecognizeSystem"
QT_MOC_LITERAL(1, 16, 20), // "UpdateBytesAvailable"
QT_MOC_LITERAL(2, 37, 0), // ""
QT_MOC_LITERAL(3, 38, 4), // "size"
QT_MOC_LITERAL(4, 43, 6), // "sended"
QT_MOC_LITERAL(5, 50, 12), // "LoadComplete"
QT_MOC_LITERAL(6, 63, 12), // "onNeedUpdate"
QT_MOC_LITERAL(7, 76, 4), // "flag"
QT_MOC_LITERAL(8, 81, 9), // "fileCount"
QT_MOC_LITERAL(9, 91, 14), // "onSendDebugLog"
QT_MOC_LITERAL(10, 106, 7), // "message"
QT_MOC_LITERAL(11, 114, 14), // "SockedDisabled"
QT_MOC_LITERAL(12, 129, 13), // "SaveLoginData"
QT_MOC_LITERAL(13, 143, 20), // "ServerAuthorization*"
QT_MOC_LITERAL(14, 164, 10), // "serverAuth"
QT_MOC_LITERAL(15, 175, 22), // "SocketWaitForReadyRead"
QT_MOC_LITERAL(16, 198, 8) // "waitTime"
QT_MOC_LITERAL(1, 16, 23), // "sigUpdateBytesAvailable"
QT_MOC_LITERAL(2, 40, 0), // ""
QT_MOC_LITERAL(3, 41, 4), // "size"
QT_MOC_LITERAL(4, 46, 6), // "sended"
QT_MOC_LITERAL(5, 53, 15), // "sigLoadComplete"
QT_MOC_LITERAL(6, 69, 13), // "sigNeedUpdate"
QT_MOC_LITERAL(7, 83, 4), // "flag"
QT_MOC_LITERAL(8, 88, 9), // "fileCount"
QT_MOC_LITERAL(9, 98, 15), // "sigSendDebugLog"
QT_MOC_LITERAL(10, 114, 7), // "message"
QT_MOC_LITERAL(11, 122, 17), // "sigSocketDisabled"
QT_MOC_LITERAL(12, 140, 16), // "sigSaveLoginData"
QT_MOC_LITERAL(13, 157, 20), // "ServerAuthorization*"
QT_MOC_LITERAL(14, 178, 10), // "serverAuth"
QT_MOC_LITERAL(15, 189, 25), // "sigSocketWaitForReadyRead"
QT_MOC_LITERAL(16, 215, 8) // "waitTime"
},
"RecognizeSystem\0UpdateBytesAvailable\0"
"\0size\0sended\0LoadComplete\0onNeedUpdate\0"
"flag\0fileCount\0onSendDebugLog\0message\0"
"SockedDisabled\0SaveLoginData\0"
"RecognizeSystem\0sigUpdateBytesAvailable\0"
"\0size\0sended\0sigLoadComplete\0sigNeedUpdate\0"
"flag\0fileCount\0sigSendDebugLog\0message\0"
"sigSocketDisabled\0sigSaveLoginData\0"
"ServerAuthorization*\0serverAuth\0"
"SocketWaitForReadyRead\0waitTime"
"sigSocketWaitForReadyRead\0waitTime"
};
#undef QT_MOC_LITERAL
@@ -100,62 +100,62 @@ void RecognizeSystem::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int
auto *_t = static_cast<RecognizeSystem *>(_o);
Q_UNUSED(_t)
switch (_id) {
case 0: _t->UpdateBytesAvailable((*reinterpret_cast< qint64(*)>(_a[1])),(*reinterpret_cast< quint64(*)>(_a[2]))); break;
case 1: _t->LoadComplete(); break;
case 2: _t->onNeedUpdate((*reinterpret_cast< bool(*)>(_a[1])),(*reinterpret_cast< qint64(*)>(_a[2])),(*reinterpret_cast< quint64(*)>(_a[3]))); break;
case 3: _t->onSendDebugLog((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 4: _t->SockedDisabled(); break;
case 5: _t->SaveLoginData((*reinterpret_cast< ServerAuthorization*(*)>(_a[1]))); break;
case 6: _t->SocketWaitForReadyRead((*reinterpret_cast< int(*)>(_a[1]))); break;
case 0: _t->sigUpdateBytesAvailable((*reinterpret_cast< qint64(*)>(_a[1])),(*reinterpret_cast< quint64(*)>(_a[2]))); break;
case 1: _t->sigLoadComplete(); break;
case 2: _t->sigNeedUpdate((*reinterpret_cast< bool(*)>(_a[1])),(*reinterpret_cast< qint64(*)>(_a[2])),(*reinterpret_cast< quint64(*)>(_a[3]))); break;
case 3: _t->sigSendDebugLog((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 4: _t->sigSocketDisabled(); break;
case 5: _t->sigSaveLoginData((*reinterpret_cast< ServerAuthorization*(*)>(_a[1]))); break;
case 6: _t->sigSocketWaitForReadyRead((*reinterpret_cast< int(*)>(_a[1]))); break;
default: ;
}
} else if (_c == QMetaObject::IndexOfMethod) {
int *result = reinterpret_cast<int *>(_a[0]);
{
using _t = void (RecognizeSystem::*)(qint64 , quint64 );
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&RecognizeSystem::UpdateBytesAvailable)) {
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&RecognizeSystem::sigUpdateBytesAvailable)) {
*result = 0;
return;
}
}
{
using _t = void (RecognizeSystem::*)();
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&RecognizeSystem::LoadComplete)) {
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&RecognizeSystem::sigLoadComplete)) {
*result = 1;
return;
}
}
{
using _t = void (RecognizeSystem::*)(bool , qint64 , quint64 );
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&RecognizeSystem::onNeedUpdate)) {
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&RecognizeSystem::sigNeedUpdate)) {
*result = 2;
return;
}
}
{
using _t = void (RecognizeSystem::*)(QString );
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&RecognizeSystem::onSendDebugLog)) {
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&RecognizeSystem::sigSendDebugLog)) {
*result = 3;
return;
}
}
{
using _t = void (RecognizeSystem::*)();
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&RecognizeSystem::SockedDisabled)) {
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&RecognizeSystem::sigSocketDisabled)) {
*result = 4;
return;
}
}
{
using _t = void (RecognizeSystem::*)(ServerAuthorization * );
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&RecognizeSystem::SaveLoginData)) {
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&RecognizeSystem::sigSaveLoginData)) {
*result = 5;
return;
}
}
{
using _t = void (RecognizeSystem::*)(int );
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&RecognizeSystem::SocketWaitForReadyRead)) {
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&RecognizeSystem::sigSocketWaitForReadyRead)) {
*result = 6;
return;
}
@@ -204,47 +204,47 @@ int RecognizeSystem::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
}
// SIGNAL 0
void RecognizeSystem::UpdateBytesAvailable(qint64 _t1, quint64 _t2)
void RecognizeSystem::sigUpdateBytesAvailable(qint64 _t1, quint64 _t2)
{
void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t1))), const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t2))) };
QMetaObject::activate(this, &staticMetaObject, 0, _a);
}
// SIGNAL 1
void RecognizeSystem::LoadComplete()
void RecognizeSystem::sigLoadComplete()
{
QMetaObject::activate(this, &staticMetaObject, 1, nullptr);
}
// SIGNAL 2
void RecognizeSystem::onNeedUpdate(bool _t1, qint64 _t2, quint64 _t3)
void RecognizeSystem::sigNeedUpdate(bool _t1, qint64 _t2, quint64 _t3)
{
void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t1))), const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t2))), const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t3))) };
QMetaObject::activate(this, &staticMetaObject, 2, _a);
}
// SIGNAL 3
void RecognizeSystem::onSendDebugLog(QString _t1)
void RecognizeSystem::sigSendDebugLog(QString _t1)
{
void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t1))) };
QMetaObject::activate(this, &staticMetaObject, 3, _a);
}
// SIGNAL 4
void RecognizeSystem::SockedDisabled()
void RecognizeSystem::sigSocketDisabled()
{
QMetaObject::activate(this, &staticMetaObject, 4, nullptr);
}
// SIGNAL 5
void RecognizeSystem::SaveLoginData(ServerAuthorization * _t1)
void RecognizeSystem::sigSaveLoginData(ServerAuthorization * _t1)
{
void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t1))) };
QMetaObject::activate(this, &staticMetaObject, 5, _a);
}
// SIGNAL 6
void RecognizeSystem::SocketWaitForReadyRead(int _t1)
void RecognizeSystem::sigSocketWaitForReadyRead(int _t1)
{
void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t1))) };
QMetaObject::activate(this, &staticMetaObject, 6, _a);

Binary file not shown.

Binary file not shown.

View File

@@ -23,7 +23,7 @@ QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_TCPClient_t {
QByteArrayData data[12];
char stringdata0[130];
char stringdata0[140];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
@@ -33,23 +33,23 @@ struct qt_meta_stringdata_TCPClient_t {
static const qt_meta_stringdata_TCPClient_t qt_meta_stringdata_TCPClient = {
{
QT_MOC_LITERAL(0, 0, 9), // "TCPClient"
QT_MOC_LITERAL(1, 10, 14), // "onSendDebugLog"
QT_MOC_LITERAL(2, 25, 0), // ""
QT_MOC_LITERAL(3, 26, 7), // "message"
QT_MOC_LITERAL(4, 34, 9), // "Recognize"
QT_MOC_LITERAL(5, 44, 11), // "QTcpSocket*"
QT_MOC_LITERAL(6, 56, 6), // "socket"
QT_MOC_LITERAL(7, 63, 15), // "ConnectionState"
QT_MOC_LITERAL(8, 79, 4), // "flag"
QT_MOC_LITERAL(9, 84, 18), // "signalGetXmlAnswer"
QT_MOC_LITERAL(10, 103, 14), // "MessageEntered"
QT_MOC_LITERAL(11, 118, 11) // "onReadyRead"
QT_MOC_LITERAL(1, 10, 15), // "sigSendDebugLog"
QT_MOC_LITERAL(2, 26, 0), // ""
QT_MOC_LITERAL(3, 27, 7), // "message"
QT_MOC_LITERAL(4, 35, 12), // "sigRecognize"
QT_MOC_LITERAL(5, 48, 11), // "QTcpSocket*"
QT_MOC_LITERAL(6, 60, 6), // "socket"
QT_MOC_LITERAL(7, 67, 18), // "sigConnectionState"
QT_MOC_LITERAL(8, 86, 4), // "flag"
QT_MOC_LITERAL(9, 91, 15), // "sigGetXmlAnswer"
QT_MOC_LITERAL(10, 107, 18), // "slotMessageEntered"
QT_MOC_LITERAL(11, 126, 13) // "slotReadyRead"
},
"TCPClient\0onSendDebugLog\0\0message\0"
"Recognize\0QTcpSocket*\0socket\0"
"ConnectionState\0flag\0signalGetXmlAnswer\0"
"MessageEntered\0onReadyRead"
"TCPClient\0sigSendDebugLog\0\0message\0"
"sigRecognize\0QTcpSocket*\0socket\0"
"sigConnectionState\0flag\0sigGetXmlAnswer\0"
"slotMessageEntered\0slotReadyRead"
};
#undef QT_MOC_LITERAL
@@ -95,13 +95,13 @@ void TCPClient::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, v
auto *_t = static_cast<TCPClient *>(_o);
Q_UNUSED(_t)
switch (_id) {
case 0: _t->onSendDebugLog((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 1: _t->Recognize((*reinterpret_cast< QTcpSocket*(*)>(_a[1]))); break;
case 2: _t->ConnectionState((*reinterpret_cast< bool(*)>(_a[1]))); break;
case 3: { QByteArray _r = _t->signalGetXmlAnswer((*reinterpret_cast< QString(*)>(_a[1])));
case 0: _t->sigSendDebugLog((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 1: _t->sigRecognize((*reinterpret_cast< QTcpSocket*(*)>(_a[1]))); break;
case 2: _t->sigConnectionState((*reinterpret_cast< bool(*)>(_a[1]))); break;
case 3: { QByteArray _r = _t->sigGetXmlAnswer((*reinterpret_cast< QString(*)>(_a[1])));
if (_a[0]) *reinterpret_cast< QByteArray*>(_a[0]) = std::move(_r); } break;
case 4: _t->MessageEntered((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 5: _t->onReadyRead(); break;
case 4: _t->slotMessageEntered((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 5: _t->slotReadyRead(); break;
default: ;
}
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
@@ -119,28 +119,28 @@ void TCPClient::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, v
int *result = reinterpret_cast<int *>(_a[0]);
{
using _t = void (TCPClient::*)(QString );
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&TCPClient::onSendDebugLog)) {
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&TCPClient::sigSendDebugLog)) {
*result = 0;
return;
}
}
{
using _t = void (TCPClient::*)(QTcpSocket * );
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&TCPClient::Recognize)) {
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&TCPClient::sigRecognize)) {
*result = 1;
return;
}
}
{
using _t = void (TCPClient::*)(bool );
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&TCPClient::ConnectionState)) {
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&TCPClient::sigConnectionState)) {
*result = 2;
return;
}
}
{
using _t = QByteArray (TCPClient::*)(QString );
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&TCPClient::signalGetXmlAnswer)) {
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&TCPClient::sigGetXmlAnswer)) {
*result = 3;
return;
}
@@ -189,28 +189,28 @@ int TCPClient::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
}
// SIGNAL 0
void TCPClient::onSendDebugLog(QString _t1)
void TCPClient::sigSendDebugLog(QString _t1)
{
void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t1))) };
QMetaObject::activate(this, &staticMetaObject, 0, _a);
}
// SIGNAL 1
void TCPClient::Recognize(QTcpSocket * _t1)
void TCPClient::sigRecognize(QTcpSocket * _t1)
{
void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t1))) };
QMetaObject::activate(this, &staticMetaObject, 1, _a);
}
// SIGNAL 2
void TCPClient::ConnectionState(bool _t1)
void TCPClient::sigConnectionState(bool _t1)
{
void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t1))) };
QMetaObject::activate(this, &staticMetaObject, 2, _a);
}
// SIGNAL 3
QByteArray TCPClient::signalGetXmlAnswer(QString _t1)
QByteArray TCPClient::sigGetXmlAnswer(QString _t1)
{
QByteArray _t0{};
void *_a[] = { const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t0))), const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t1))) };

Binary file not shown.

166
debug/qrc_resources.cpp Normal file
View File

@@ -0,0 +1,166 @@
/****************************************************************************
** Resource object code
**
** Created by: The Resource Compiler for Qt version 5.14.2
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
static const unsigned char qt_resource_data[] = {
// E:/Projects/QT/GUIProj/RRJClient/RRJClient/plane.png
0x0,0x0,0x4,0x49,
0x89,
0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,
0x0,0x0,0x40,0x0,0x0,0x0,0x40,0x8,0x3,0x0,0x0,0x0,0x9d,0xb7,0x81,0xec,
0x0,0x0,0x0,0x3,0x73,0x42,0x49,0x54,0x8,0x8,0x8,0xdb,0xe1,0x4f,0xe0,0x0,
0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0x1,0xbb,0x0,0x0,0x1,0xbb,0x1,
0x3a,0xec,0xe3,0xe2,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x53,0x6f,0x66,0x74,
0x77,0x61,0x72,0x65,0x0,0x77,0x77,0x77,0x2e,0x69,0x6e,0x6b,0x73,0x63,0x61,0x70,
0x65,0x2e,0x6f,0x72,0x67,0x9b,0xee,0x3c,0x1a,0x0,0x0,0x1,0x2f,0x50,0x4c,0x54,
0x45,0xff,0xff,0xff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x3a,0xf4,0x2c,0xd2,0x0,0x0,0x0,0x64,0x74,0x52,0x4e,0x53,0x0,0x1,0x2,0x3,
0x4,0x5,0x7,0x8,0x9,0xa,0xe,0x12,0x14,0x15,0x1a,0x1b,0x1c,0x1d,0x23,0x24,
0x28,0x29,0x2a,0x2b,0x2c,0x31,0x34,0x35,0x3c,0x3e,0x40,0x41,0x42,0x49,0x51,0x53,
0x55,0x56,0x57,0x58,0x5b,0x5d,0x60,0x63,0x65,0x69,0x6b,0x72,0x7e,0x80,0x83,0x84,
0x88,0x89,0x8b,0x8c,0x8d,0x95,0x9a,0x9b,0x9e,0xa0,0xaa,0xab,0xac,0xb1,0xb2,0xb5,
0xbc,0xbd,0xc0,0xc1,0xc7,0xc9,0xca,0xcb,0xcc,0xd2,0xd3,0xd5,0xd6,0xd9,0xdb,0xdd,
0xe1,0xe6,0xeb,0xed,0xf0,0xf1,0xf3,0xf4,0xf6,0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,0xfe,
0x90,0xa8,0x74,0x7a,0x0,0x0,0x2,0x1c,0x49,0x44,0x41,0x54,0x18,0x19,0xed,0xc1,
0x77,0x23,0x6a,0x71,0x0,0x6,0xe0,0xb7,0x81,0x50,0x46,0x56,0x72,0xec,0x99,0x8,
0xc9,0x28,0xba,0xa2,0xcc,0xec,0x11,0x1d,0xd,0xea,0xfd,0xfe,0x9f,0xe1,0xea,0x54,
0xc7,0xa9,0x7e,0x67,0x74,0xfd,0x79,0x3d,0xf,0xf0,0xeb,0x7f,0xd5,0xb7,0x38,0x89,
0x1f,0x58,0x4a,0x97,0xc9,0x3f,0xf8,0x57,0x3,0x27,0x54,0x4c,0xc2,0x54,0xd7,0x5a,
0x3c,0x3e,0x8a,0x26,0xf3,0x59,0x56,0x2d,0xc2,0xcc,0xca,0xb,0xc9,0x73,0x34,0x70,
0x44,0x58,0x53,0xee,0x83,0x31,0xfb,0xe,0x2b,0xee,0xa0,0xe5,0x4e,0xb1,0x2e,0xd,
0xb1,0x99,0xdb,0xe3,0xed,0xe5,0xb1,0xe,0x20,0x46,0x45,0x18,0x1a,0xfe,0x67,0xaa,
0x96,0x20,0x14,0x2c,0xb2,0xa2,0x70,0x93,0xa2,0x22,0xe7,0xc1,0xb7,0x60,0x9e,0xaa,
0x13,0x88,0xd8,0x22,0x6c,0x72,0xe1,0x77,0xa1,0xa6,0x33,0xc6,0x6f,0xd9,0x1,0x8,
0xb8,0x12,0x6c,0x55,0x7a,0x48,0x6c,0xce,0xd,0xd9,0x31,0x78,0x45,0x8d,0x79,0x88,
0x8c,0x9f,0x51,0xcf,0xfb,0x65,0x86,0x1a,0x11,0xe8,0x98,0x38,0x2a,0xd1,0x82,0x94,
0x3,0xba,0xbc,0xd1,0x1c,0xcd,0x3c,0xbb,0x61,0xc4,0xbd,0x95,0xa1,0xa1,0xbc,0x1f,
0x26,0xba,0x43,0x4f,0x34,0x10,0x84,0x39,0xc7,0x42,0x9a,0x7a,0x62,0xb0,0x66,0x2a,
0x59,0xa6,0xc8,0x55,0x27,0xac,0xf2,0xc5,0x8b,0x6c,0x91,0x19,0x44,0x1b,0xfa,0x77,
0xb3,0x6c,0x72,0x89,0xf6,0x78,0x32,0x6c,0xf4,0x6e,0x47,0x5b,0xe,0xd9,0x6c,0x8,
0xed,0xd8,0x60,0x8b,0x39,0xb4,0x61,0xf6,0x93,0x2d,0x36,0x61,0xdd,0xc8,0x1b,0x5b,
0x25,0x60,0x59,0xef,0x23,0x5,0x1e,0x60,0x95,0xf3,0x94,0x22,0x25,0x17,0x2c,0x8a,
0x52,0x23,0x43,0x95,0xdf,0x13,0xbe,0x3b,0x1f,0x85,0xa9,0x75,0x6a,0x1c,0x7a,0xb2,
0xac,0xbb,0xc8,0x91,0x8c,0xc3,0xcc,0xf4,0x7,0x55,0x9f,0x1b,0xc0,0x2e,0x1b,0xc4,
0x61,0xc2,0xfb,0x4a,0xd5,0xdb,0x2c,0x80,0xfe,0x22,0xb5,0xd6,0x60,0xac,0xe7,0x9e,
0xaa,0xc7,0x11,0x54,0xc4,0xa9,0xf1,0xd2,0x5,0x43,0xf6,0x24,0x55,0xa7,0xbd,0x50,
0xf8,0xca,0xfc,0xb6,0x2,0x63,0x7b,0x54,0x45,0x9d,0xa8,0x49,0x52,0xb5,0x3,0x11,
0x5b,0x78,0x3f,0xe0,0x73,0xe2,0xcb,0x2a,0xeb,0x3e,0xd6,0xa1,0x9a,0x62,0x5d,0xcc,
0xe,0x1,0xdb,0x1,0xbf,0xe4,0xaf,0xf,0x42,0x81,0x2,0x6b,0x5e,0xa7,0xa1,0x91,
0x66,0x55,0xa,0x42,0xc3,0x32,0x9b,0xdd,0x7b,0xa1,0xb5,0xc0,0xaa,0x1b,0x88,0x49,
0x32,0x1b,0x25,0x7b,0xd0,0xc0,0xf1,0x44,0x45,0xa1,0x3,0x62,0x92,0x4c,0xad,0x3d,
0x3b,0x9a,0x84,0x58,0x35,0x6,0x1d,0x92,0x4c,0x55,0x61,0x15,0x2d,0xba,0x33,0x54,
0x2c,0x43,0x8f,0x24,0xb3,0x2e,0x0,0x81,0x2d,0x2a,0xb6,0xa1,0x4b,0x92,0x59,0x13,
0x82,0x80,0x3b,0xc7,0x8a,0x63,0xe8,0x93,0x64,0x56,0x1d,0x40,0x24,0xca,0x8a,0x5b,
0x18,0x90,0x64,0x2a,0xae,0x21,0xe2,0x2d,0x91,0x2c,0xce,0xc0,0x88,0x24,0xb3,0x22,
0xef,0x84,0xc8,0x11,0xc9,0x20,0x8c,0x49,0x32,0x2b,0x7c,0x10,0x99,0x20,0x23,0x30,
0x23,0xc9,0xfc,0x12,0x80,0xd0,0x59,0xc2,0x6,0x53,0x92,0x4c,0x72,0x1f,0x42,0xe3,
0x2e,0x58,0x20,0xc9,0x64,0x18,0x3f,0x21,0xc9,0x7,0x36,0xfc,0xc8,0xb0,0xd,0xbf,
0xfe,0x2b,0x7f,0x1,0x77,0xc7,0x87,0x2a,0x7d,0x51,0xb0,0x7e,0x0,0x0,0x0,0x0,
0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82,
};
static const unsigned char qt_resource_name[] = {
// new
0x0,0x3,
0x0,0x0,0x74,0xc7,
0x0,0x6e,
0x0,0x65,0x0,0x77,
// resoures
0x0,0x8,
0xc,0xa6,0xc7,0xc3,
0x0,0x72,
0x0,0x65,0x0,0x73,0x0,0x6f,0x0,0x75,0x0,0x72,0x0,0x65,0x0,0x73,
// plane.png
0x0,0x9,
0x8,0x48,0xb9,0x7,
0x0,0x70,
0x0,0x6c,0x0,0x61,0x0,0x6e,0x0,0x65,0x0,0x2e,0x0,0x70,0x0,0x6e,0x0,0x67,
};
static const unsigned char qt_resource_struct[] = {
// :
0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x1,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
// :/new
0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x2,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
// :/new/resoures
0x0,0x0,0x0,0xc,0x0,0x2,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x3,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
// :/new/resoures/plane.png
0x0,0x0,0x0,0x22,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x0,
0x0,0x0,0x1,0x91,0x9c,0xe6,0x26,0x16,
};
#ifdef QT_NAMESPACE
# define QT_RCC_PREPEND_NAMESPACE(name) ::QT_NAMESPACE::name
# define QT_RCC_MANGLE_NAMESPACE0(x) x
# define QT_RCC_MANGLE_NAMESPACE1(a, b) a##_##b
# define QT_RCC_MANGLE_NAMESPACE2(a, b) QT_RCC_MANGLE_NAMESPACE1(a,b)
# define QT_RCC_MANGLE_NAMESPACE(name) QT_RCC_MANGLE_NAMESPACE2( \
QT_RCC_MANGLE_NAMESPACE0(name), QT_RCC_MANGLE_NAMESPACE0(QT_NAMESPACE))
#else
# define QT_RCC_PREPEND_NAMESPACE(name) name
# define QT_RCC_MANGLE_NAMESPACE(name) name
#endif
#ifdef QT_NAMESPACE
namespace QT_NAMESPACE {
#endif
bool qRegisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *);
bool qUnregisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *);
#ifdef QT_NAMESPACE
}
#endif
int QT_RCC_MANGLE_NAMESPACE(qInitResources_resources)();
int QT_RCC_MANGLE_NAMESPACE(qInitResources_resources)()
{
int version = 3;
QT_RCC_PREPEND_NAMESPACE(qRegisterResourceData)
(version, qt_resource_struct, qt_resource_name, qt_resource_data);
return 1;
}
int QT_RCC_MANGLE_NAMESPACE(qCleanupResources_resources)();
int QT_RCC_MANGLE_NAMESPACE(qCleanupResources_resources)()
{
int version = 3;
QT_RCC_PREPEND_NAMESPACE(qUnregisterResourceData)
(version, qt_resource_struct, qt_resource_name, qt_resource_data);
return 1;
}
namespace {
struct initializer {
initializer() { QT_RCC_MANGLE_NAMESPACE(qInitResources_resources)(); }
~initializer() { QT_RCC_MANGLE_NAMESPACE(qCleanupResources_resources)(); }
} dummy;
}

BIN
debug/qrc_resources.o Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -8,13 +8,13 @@ MainWindow::MainWindow(QWidget *parent)
, ui(new Ui::MainWindow)
{
ui->setupUi(this);
Initialize();
initialize();
}
void MainWindow::Initialize()
void MainWindow::initialize()
{
ui->settingsWidget->hide();
@@ -43,17 +43,17 @@ void MainWindow::Initialize()
externalExecuter = new ExternalExecuter;
timer = new QTimer;
connect(timer,&QTimer::timeout,this,&MainWindow::disableNotify);
connect(timer,&QTimer::timeout,this,&MainWindow::slotDisableNotify);
connect(recognizeSystem,&RecognizeSystem::UpdateBytesAvailable,this,&MainWindow::UpdateProgress);
connect(recognizeSystem,&RecognizeSystem::LoadComplete,this,&MainWindow::LoadComplete);
connect(recognizeSystem,&RecognizeSystem::onNeedUpdate,this,&MainWindow::SetNeedUpdate);
connect(recognizeSystem,&RecognizeSystem::onSendDebugLog,this,&MainWindow::DebugLog);
connect(recognizeSystem,&RecognizeSystem::SockedDisabled,this,&MainWindow::LostConnection);
connect(recognizeSystem,&RecognizeSystem::SaveLoginData,this,&MainWindow::CheckLoginResult);
connect(recognizeSystem,&RecognizeSystem::SocketWaitForReadyRead,client,&TCPClient::WaitRead,Qt::AutoConnection);
connect(recognizeSystem,&RecognizeSystem::sigUpdateBytesAvailable,this,&MainWindow::updateProgress);
connect(recognizeSystem,&RecognizeSystem::sigLoadComplete,this,&MainWindow::loadComplete);
connect(recognizeSystem,&RecognizeSystem::sigNeedUpdate,this,&MainWindow::setNeedUpdate);
connect(recognizeSystem,&RecognizeSystem::sigSendDebugLog,this,&MainWindow::debugLog);
connect(recognizeSystem,&RecognizeSystem::sigSocketDisabled,this,&MainWindow::lostConnection);
connect(recognizeSystem,&RecognizeSystem::sigSaveLoginData,this,&MainWindow::checkLoginResult);
connect(recognizeSystem,&RecognizeSystem::sigSocketWaitForReadyRead,client,&TCPClient::waitRead,Qt::AutoConnection);
connect(client,&TCPClient::signalGetXmlAnswer,dataParser,&DataParser::slotGetXmlAnswer);
connect(client,&TCPClient::sigGetXmlAnswer,dataParser,&DataParser::slotGetXmlAnswer);
connectionThread->start();
updateControllerThread->start();
@@ -61,22 +61,22 @@ void MainWindow::Initialize()
updateControllerThread->setPriority(QThread::LowPriority);
connectionThread->setPriority(QThread::HighestPriority);
connect(client,&TCPClient::onSendDebugLog,this,&MainWindow::DebugLog,Qt::AutoConnection);
connect(client,&TCPClient::sigSendDebugLog,this,&MainWindow::debugLog,Qt::AutoConnection);
connect(this,&MainWindow::onInitializeClient,client,&TCPClient::Initialize,Qt::AutoConnection);
connect(this,&MainWindow::onSetConnect,client,&TCPClient::SetConnect,Qt::AutoConnection);
connect(this,&MainWindow::onSendMessage,client,&TCPClient::MessageEntered,Qt::AutoConnection);
connect(this,&MainWindow::SendClientAuthorization,client,&TCPClient::SendClientAutorization,Qt::AutoConnection);
connect(client,&TCPClient::ConnectionState,this,&MainWindow::onConnectionState);
connect(this,&MainWindow::sigInitializeClient,client,&TCPClient::initialize,Qt::AutoConnection);
connect(this,&MainWindow::sigSetConnect,client,&TCPClient::setConnect,Qt::AutoConnection);
connect(this,&MainWindow::sigSendMessage,client,&TCPClient::slotMessageEntered,Qt::AutoConnection);
connect(this,&MainWindow::sigSendClientAuthorization,client,&TCPClient::sendClientAutorization,Qt::AutoConnection);
connect(client,&TCPClient::sigConnectionState,this,&MainWindow::slotConnectionState);
connect(this,&MainWindow::onCalculateHash,updateController,&UpdateController::CalculateHash);
connect(this,&MainWindow::sigCalculateHash,updateController,&UpdateController::calculateHash);
emit onCalculateHash();
emit onInitializeClient(recognizeSystem,externalExecuter);
emit sigCalculateHash();
emit sigInitializeClient(recognizeSystem,externalExecuter);
recognizeSystem->Initialize(updateController,dataParser);
recognizeSystem->initialize(updateController,dataParser);
screenChecker->Check();
screenChecker->check();
ui->updateButton->setEnabled(false);
ui->startButton->setEnabled(false);
@@ -86,13 +86,13 @@ void MainWindow::Initialize()
ui->loadingProgressBar->setValue(0);
loadStaticData();
emit onSetConnect(dataParser->GetServerSettings());
emit sigSetConnect(dataParser->getServerSettings());
CheckAppAvailable();
checkAppAvailable();
}
void MainWindow::UpdateProgress(qint64 size,quint64 sended)
void MainWindow::updateProgress(qint64 size,quint64 sended)
{
float currentValue = 100.00 / (maxBytesAvailable / size);
globalValue += currentValue;
@@ -100,17 +100,17 @@ void MainWindow::UpdateProgress(qint64 size,quint64 sended)
ui->loadingProgressBar->setValue(globalValue);
}
void MainWindow::LoadComplete()
void MainWindow::loadComplete()
{
ui->loadingProgressBar->setValue(100);
ui->updateButton->setEnabled(false);
externalExecuter->FindApp();
externalExecuter->findApp();
ui->startButton->setEnabled(true);
autoStart();
ui->inlineTextDebug->setText(tr("Обновление завершено..."));
}
void MainWindow::SetNeedUpdate(bool flag,quint64 size, quint64 fileCount)
void MainWindow::setNeedUpdate(bool flag,quint64 size, quint64 fileCount)
{
maxBytesAvailable = 0;
QString availableSizeText;
@@ -132,15 +132,15 @@ void MainWindow::SetNeedUpdate(bool flag,quint64 size, quint64 fileCount)
ui->loadingProgressBar->setRange(0,100);
}
void MainWindow::LostConnection()
void MainWindow::lostConnection()
{
ui->loadingProgressBar->setValue(0);
}
void MainWindow::CheckLoginResult(ServerAuthorization *serverAuth)
void MainWindow::checkLoginResult(ServerAuthorization *serverAuth)
{
if (serverAuth->Result){
emit onSendMessage("check");
emit sigSendMessage("check");
ui->inlineTextDebug->setText(tr("Проверка обновлений..."));
@@ -149,7 +149,7 @@ void MainWindow::CheckLoginResult(ServerAuthorization *serverAuth)
ui->displayGroupWidget->show();
ui->autostartCheckBox->show();
dataParser->CreateAuthData(serverAuth);
dataParser->createAuthData(serverAuth);
ui->loginWidget->hide();
}
@@ -167,9 +167,9 @@ void MainWindow::CheckLoginResult(ServerAuthorization *serverAuth)
}
void MainWindow::CheckAppAvailable()
void MainWindow::checkAppAvailable()
{
bool isAvailable = externalExecuter->FindApp();
bool isAvailable = externalExecuter->findApp();
ui->startButton->setEnabled(isAvailable);
}
@@ -197,7 +197,7 @@ void MainWindow::autoStart()
void MainWindow::loadStaticData()
{
ServerSettings *currentSettings = dataParser->GetServerSettings();
ServerSettings *currentSettings = dataParser->getServerSettings();
ui->serverInputField->setText(currentSettings->Address);
ui->portInputField->setText(currentSettings->Port);
@@ -207,65 +207,7 @@ void MainWindow::loadStaticData()
checkLanguage(currentSettings->Language);
}
void MainWindow::on_loginButton_clicked()
{
QString username = ui->loginInputField->text();
QString password = ui->passwordInputField->text();
ClientAutorization *autorization = new ClientAutorization;
autorization->Login = username;
autorization->Password = password;
dataParser->CreateAuthMessage(autorization);
emit SendClientAuthorization();
}
void MainWindow::on_updateButton_clicked()
{
emit onSendMessage("update");
ui->updateButton->hide();
ui->loadingProgressBar->setValue(0);
}
void MainWindow::on_startButton_clicked()
{
client->SendUnityConnect();
externalExecuter->CallApp();
}
void MainWindow::on_saveServerButton_clicked()
{
ui->settingsWidget->hide();
ui->loginWidget->show();
QString server = ui->serverInputField->text();
QString port = ui->portInputField->text();
dataParser->CreateServerSettings(server,port);
emit onSetConnect(dataParser->GetServerSettings());
}
void MainWindow::on_settingsButton_clicked()
{
ui->settingsWidget->show();
ui->loginWidget->hide();
}
void MainWindow::disableNotify()
{
ui->notificationLabel->hide();
QPalette palette = ui->notificationLabel->palette();
palette.setColor(ui->notificationLabel->foregroundRole(), Qt::black);
ui->notificationLabel->setPalette(palette);
timer->stop();
}
void MainWindow::onConnectionState(bool flag)
void MainWindow::slotConnectionState(bool flag)
{
ui->notificationLabel->show();
QPalette palette = ui->notificationLabel->palette();
@@ -287,12 +229,86 @@ void MainWindow::onConnectionState(bool flag)
timer->start(3000);
}
void MainWindow::DebugLog(QString message)
void MainWindow::slotDisableNotify()
{
ui->notificationLabel->hide();
QPalette palette = ui->notificationLabel->palette();
palette.setColor(ui->notificationLabel->foregroundRole(), Qt::black);
ui->notificationLabel->setPalette(palette);
timer->stop();
}
void MainWindow::debugLog(QString message)
{
ui->debugText->append(message);
}
void MainWindow::on_loginButton_clicked()
{
QString username = ui->loginInputField->text();
QString password = ui->passwordInputField->text();
ClientAutorization *autorization = new ClientAutorization;
autorization->Login = username;
autorization->Password = password;
dataParser->createAuthMessage(autorization);
emit sigSendClientAuthorization();
}
void MainWindow::on_updateButton_clicked()
{
emit sigSendMessage("update");
ui->updateButton->hide();
ui->loadingProgressBar->setValue(0);
}
void MainWindow::on_startButton_clicked()
{
client->sendUnityConnect();
externalExecuter->callApp();
}
void MainWindow::on_saveServerButton_clicked()
{
ui->settingsWidget->hide();
ui->loginWidget->show();
QString server = ui->serverInputField->text();
QString port = ui->portInputField->text();
dataParser->createServerSettings(server,port);
emit sigSetConnect(dataParser->getServerSettings());
}
void MainWindow::on_settingsButton_clicked()
{
ui->settingsWidget->show();
ui->loginWidget->hide();
}
void MainWindow::on_connectButton_clicked()
{
emit sigSetConnect(dataParser->getServerSettings());
}
void MainWindow::on_languageComboBox_activated(const QString &arg1)
{
qDebug() << arg1;
dataParser->saveClientSettrings(arg1,ui->autostartCheckBox->isChecked());
checkLanguage(arg1);
ui->retranslateUi(this);
}
MainWindow::~MainWindow()
{
connectionThread->quit();
@@ -308,15 +324,3 @@ MainWindow::~MainWindow()
delete ui;
}
void MainWindow::on_connectButton_clicked()
{
emit onSetConnect(dataParser->GetServerSettings());
}
void MainWindow::on_languageComboBox_activated(const QString &arg1)
{
qDebug() << arg1;
dataParser->saveClientSettrings(arg1,ui->autostartCheckBox->isChecked());
checkLanguage(arg1);
ui->retranslateUi(this);
}

View File

@@ -30,13 +30,13 @@ public:
~MainWindow();
signals:
void onInitializeClient(RecognizeSystem *recognizeSystem,
void sigInitializeClient(RecognizeSystem *recognizeSystem,
ExternalExecuter *externalExecuter);
void onSetConnect(ServerSettings* serverSettings);
void onCalculateHash();
void SendClientAuthorization();
void onSendMessage(QString message);
void sigSetConnect(ServerSettings* serverSettings);
void sigCalculateHash();
void sigSendClientAuthorization();
void sigSendMessage(QString message);
private slots:
void on_loginButton_clicked();
@@ -49,14 +49,14 @@ private slots:
void on_settingsButton_clicked();
void disableNotify();
void onConnectionState(bool flag);
void on_connectButton_clicked();
void on_languageComboBox_activated(const QString &arg1);
void slotDisableNotify();
void slotConnectionState(bool flag);
private:
Ui::MainWindow *ui;
QTranslator translator;
@@ -72,14 +72,14 @@ private:
QTimer *timer;
float globalValue;
void DebugLog(QString message);
void Initialize();
void UpdateProgress(qint64 size,quint64 sended);
void LoadComplete();
void SetNeedUpdate(bool flag,quint64 size,quint64 fileCount);
void LostConnection();
void CheckLoginResult(ServerAuthorization * serverAuth);
void CheckAppAvailable();
void debugLog(QString message);
void initialize();
void updateProgress(qint64 size,quint64 sended);
void loadComplete();
void setNeedUpdate(bool flag,quint64 size,quint64 fileCount);
void lostConnection();
void checkLoginResult(ServerAuthorization * serverAuth);
void checkAppAvailable();
void checkLanguage(QString language);
void autoStart();
void loadStaticData();

View File

@@ -7,6 +7,7 @@ debug/tcpclient.o
debug/tools.o
debug/main.o
debug/mainwindow.o
debug/qrc_resources.o
debug/moc_updatecontroller.o
debug/moc_externalexecuter.o
debug/moc_dataparser.o

View File

@@ -7,6 +7,7 @@ release/tcpclient.o
release/tools.o
release/main.o
release/mainwindow.o
release/qrc_resources.o
release/moc_updatecontroller.o
release/moc_externalexecuter.o
release/moc_dataparser.o

5
resources.qrc Normal file
View File

@@ -0,0 +1,5 @@
<RCC>
<qresource prefix="/new/resoures">
<file>plane.png</file>
</qresource>
</RCC>