diff --git a/Core/UpdateController.cpp b/Core/UpdateController.cpp index 6faf1e8..6cf0ec2 100644 --- a/Core/UpdateController.cpp +++ b/Core/UpdateController.cpp @@ -104,67 +104,6 @@ QList UpdateController::calculateHash(QString path,QString ignoreName) } } - -// QDirIterator iterator(dir,QDirIterator::Subdirectories); -// - -// if(!QDir(path).exists()) -// { //проверка на наличие папки -// QDir().mkdir(path); -// } - -// QString hashString; - -// while (iterator.hasNext()) -// { -// iterator.next(); -// QFileInfo fileInfo = iterator.fileInfo(); -// FileData currentFile; -// QFile file(fileInfo.absoluteFilePath()); - -// quint64 fileSize = file.size(); //буффер для хэширования крупных файлов -// const quint64 bufferSize = 10240; - -// if(fileInfo.isHidden()) continue; -// if(ignoreName != "" && fileInfo.path().contains(ignoreName)) continue; - -// if(fileInfo.isFile() && file.open(QIODevice::ReadOnly)) -// { -// char buffer[bufferSize]; -// int bytesRead; -// int readSize = qMin(fileSize,bufferSize); - -// QCryptographicHash hash(QCryptographicHash::Md5); - -// while(readSize > 0 && (bytesRead = file.read(buffer,readSize)) > 0){ -// fileSize -= bytesRead; -// hash.addData(buffer,bytesRead); -// readSize = qMin(fileSize,bufferSize); -// } - -// hashString = QString(hash.result().toHex()); -// currentFile.path = Tools::createLocalPath(fileInfo.absoluteFilePath()); -// currentFile.hash = hashString; -// hashes->push_back(currentFile); -// file.close(); -// } -// else if (fileInfo.isDir() && !fileInfo.isRoot() && fileInfo.fileName() != "..") -// { -// currentFile.path = Tools::createLocalPath(fileInfo.path()); -// currentFile.hash = "FOLDER"; - -// if(!hashes->contains(currentFile)) -// { -// hashes->push_back(currentFile); -// } -// } - -// } - - - - //std::sort(hashes->begin(),hashes->end()); - return *hashes; } @@ -183,7 +122,8 @@ void UpdateController::updateFilesOnServer(QList *fileSendList){ } else { - sendSystem->sendFileBlock(data.path); + QString fullPath = Tools::createReceiveFullPath(data.path,versionContainer->getLocalVersionData()); + sendSystem->sendFileBlockWithVersion(fullPath,data.path); } } diff --git a/Core/notifycontroller.cpp b/Core/notifycontroller.cpp index b5f6e7c..7c09e24 100644 --- a/Core/notifycontroller.cpp +++ b/Core/notifycontroller.cpp @@ -9,6 +9,7 @@ void NotifyController::showWarning(QString text) { QMessageBox warning; warning.setText(text); + warning.setIcon(QMessageBox::Warning); warning.setWindowTitle(tr("Ошибка")); warning.exec(); diff --git a/Core/recognizesystem.cpp b/Core/recognizesystem.cpp index 4a661aa..15b6af1 100644 --- a/Core/recognizesystem.cpp +++ b/Core/recognizesystem.cpp @@ -297,7 +297,7 @@ void RecognizeSystem::checkAccessType(QString type) void RecognizeSystem::setServerVersion(StreamingVersionData *serverVersion) { - versionContainer->setServerVersonData(serverVersion); + versionContainer->setServerVersionData(serverVersion); } void RecognizeSystem::showServerDataList(QList *showServerDataList) diff --git a/Core/sendsystem.cpp b/Core/sendsystem.cpp index 519da13..efac325 100644 --- a/Core/sendsystem.cpp +++ b/Core/sendsystem.cpp @@ -98,6 +98,46 @@ void SendSystem::sendFolderBlock(QString path) socket->waitForReadyRead(100); } +void SendSystem::sendFileBlockWithVersion(QString localPath,QString serverPath) +{ + QDataStream stream(socket); + stream.setVersion(QDataStream::Qt_DefaultCompiledVersion); + //QString fullPath = Tools::createLocalPath(localPath); + quint64 fileSize = 0; + int countSend = 0; + + + QFile file(localPath); //Открываем файл для чтения + QFileInfo fileInfo(file); + + fileSize = fileInfo.size(); + + stream << PacketType::TYPE_FILE; //Отправляем тип блока + stream << serverPath << fileSize; + + socket->waitForReadyRead(20); + //socket->waitForBytesWritten(); + + if(file.open(QFile::ReadOnly)){ + while(!file.atEnd()){ + QByteArray data = file.read(1025*250); + stream << data; + socket->waitForBytesWritten(); + countSend++; + } + + qDebug() << Tools::getTime() << "count end Final: " << countSend; + } + + file.close(); + + emit sigSend(); + //qDebug() << "Transaction after send file: " << socket->isTransactionStarted(); + countSend = 0; + //socket->waitForBytesWritten(); + socket->waitForReadyRead(20); +} + void SendSystem::sendQTConnect() { QString value = QString::number(PacketType::TYPE_QT); @@ -158,6 +198,37 @@ void SendSystem::sendCopyVersion(QString streamingVersion) stream << streamingVersion; } +void SendSystem::sendPacketType(PacketType packetType) +{ + QDataStream stream(socket); + QByteArray data; + stream.setVersion(QDataStream::Qt_DefaultCompiledVersion); + + stream << packetType; +} + +void SendSystem::sendCheckHash() +{ + QDataStream stream(socket); + QByteArray data; + stream.setVersion(QDataStream::Qt_DefaultCompiledVersion); + + sendFileBlock(staticDataFolderName + hashFilename); + + socket->waitForReadyRead(2000); + stream << PacketType::TYPE_CHECK_VERSION; + //socket->waitForReadyRead(1000); + +// else if(command == "update") +// { +// qDebug() << ("Update started"); +// stream << PacketType::TYPE_COMMAND; +// stream << command; +// socket->waitForReadyRead(1000); +// } + +} + SendSystem::~SendSystem() { diff --git a/Core/sendsystem.h b/Core/sendsystem.h index 3ef3207..0aa7765 100644 --- a/Core/sendsystem.h +++ b/Core/sendsystem.h @@ -25,12 +25,15 @@ public: void sendDisable(); void sendFileBlock(QString path); void sendFolderBlock(QString path); + void sendFileBlockWithVersion(QString localPath, QString serverPath); void sendQTConnect(); void sendXMLAnswer(QByteArray array); void sendFinish(); void sendChangeVersion(StreamingVersionData *streamingVersion); void sendDeleteVersion(StreamingVersionData *streamingVersion); void sendCopyVersion(QString versionName); + void sendCheckHash(); + void sendPacketType(PacketType packetType); ~SendSystem(); signals: diff --git a/Core/tcpclient.cpp b/Core/tcpclient.cpp index 564383c..e2f914e 100644 --- a/Core/tcpclient.cpp +++ b/Core/tcpclient.cpp @@ -68,39 +68,6 @@ QTcpSocket *TCPClient::getSocket() return socket; } -void TCPClient::slotSendCommand(QString command) -{ - QDataStream stream(socket); - QByteArray data; - stream.setVersion(QDataStream::Qt_DefaultCompiledVersion); - - if(!command.isEmpty() && socket->state() == QTcpSocket::ConnectedState){ - - if(command == "check") - { - stream << PacketType::TYPE_COMMAND; - stream << command; - socket->waitForBytesWritten(); - - sendSystem->sendFileBlock(staticDataFolderName + hashFilename); - emit sigSendDebugLog(Tools::getTime() + " Local checkFile sended"); - - socket->waitForReadyRead(1000); - } - else if(command == "update"){ - emit sigSendDebugLog("Update started"); - stream << PacketType::TYPE_COMMAND; - stream << command; - socket->waitForReadyRead(1000); - } - else if(command == "run"){ - externalExecuter->callApp(); - } - }else{ - emit sigSendDebugLog("WRONG SOCKET AFTER ENTERED"); - } -} - void TCPClient::slotConnectNotify() { if(socket->state() != QTcpSocket::ConnectedState) diff --git a/Core/tcpclient.h b/Core/tcpclient.h index bfe315a..3b5e6ae 100644 --- a/Core/tcpclient.h +++ b/Core/tcpclient.h @@ -43,7 +43,6 @@ signals: void sigConnectionState(bool flag); public slots: - void slotSendCommand(QString message); void slotConnectNotify(); private slots: diff --git a/Core/tools.h b/Core/tools.h index 4d9c57a..5d4770f 100644 --- a/Core/tools.h +++ b/Core/tools.h @@ -41,6 +41,8 @@ enum PacketType{ TYPE_XMLANSWER = 8, TYPE_QT = 9, TYPE_DISABLE = 11, + TYPE_UPDATE = 12, + TYPE_CHECK_VERSION = 13, HASH_READY = 150, CHANGE_DATA_VERSION = 151, diff --git a/Core/versioncontainer.cpp b/Core/versioncontainer.cpp index b5d7c52..1c8bd1c 100644 --- a/Core/versioncontainer.cpp +++ b/Core/versioncontainer.cpp @@ -36,7 +36,7 @@ StreamingVersionData *VersionContainer::getServerVersionData() const return serverVersionData; } -void VersionContainer::setServerVersonData(StreamingVersionData *value) +void VersionContainer::setServerVersionData(StreamingVersionData *value) { serverVersionData = value; } diff --git a/Core/versioncontainer.h b/Core/versioncontainer.h index 2c9502f..cf04184 100644 --- a/Core/versioncontainer.h +++ b/Core/versioncontainer.h @@ -19,7 +19,7 @@ public: void setLocalVersionData(StreamingVersionData *value); StreamingVersionData *getServerVersionData() const; - void setServerVersonData(StreamingVersionData *value); + void setServerVersionData(StreamingVersionData *value); private: StreamingVersionData *localVersionData; diff --git a/RRJClient.pro.user b/RRJClient.pro.user index 2228674..7bda73f 100644 --- a/RRJClient.pro.user +++ b/RRJClient.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId diff --git a/StaticData/clientHash.xml b/StaticData/clientHash.xml index 845f215..d49bd2e 100644 --- a/StaticData/clientHash.xml +++ b/StaticData/clientHash.xml @@ -26,6 +26,7 @@ + @@ -183,12 +184,15 @@ + + + diff --git a/StaticData/serverHash.xml b/StaticData/serverHash.xml index 67fc33c..5552bc7 100644 --- a/StaticData/serverHash.xml +++ b/StaticData/serverHash.xml @@ -181,12 +181,7148 @@ + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/StaticData/settings.xml b/StaticData/settings.xml index 4b28bef..a377670 100644 --- a/StaticData/settings.xml +++ b/StaticData/settings.xml @@ -1,5 +1,5 @@ - + diff --git a/StaticData/streamingHash.xml b/StaticData/streamingHash.xml index fb2c4a3..69331f4 100644 --- a/StaticData/streamingHash.xml +++ b/StaticData/streamingHash.xml @@ -4,6 +4,8 @@ + + diff --git a/Widgets/commonbuttongroupwidget.cpp b/Widgets/commonbuttongroupwidget.cpp index 78b308b..fe37c8f 100644 --- a/Widgets/commonbuttongroupwidget.cpp +++ b/Widgets/commonbuttongroupwidget.cpp @@ -19,8 +19,7 @@ void CommonButtonGroupWidget::initialize(MainWindow *mainWindow,ExternalExecuter ui->startButton->hide(); ui->startButton->setEnabled(false); - - connect(this,&CommonButtonGroupWidget::sigSendCommand,client,&TCPClient::slotSendCommand,Qt::AutoConnection); + connect(this,&CommonButtonGroupWidget::sigSendPacket,sendSystem,&SendSystem::sendPacketType,Qt::AutoConnection); connect(this,&CommonButtonGroupWidget::sigSendXMLAnswer,sendSystem,&SendSystem::xmlAnswer,Qt::DirectConnection); } @@ -70,9 +69,9 @@ void CommonButtonGroupWidget::showProgressBar(bool flag) void CommonButtonGroupWidget::needUpdateState(bool flag) { - ui->startButton->show(); + ui->startButton->hide(); ui->updateButton->setEnabled(flag); - ui->startButton->setEnabled(externalExecuter->findApp()); + //ui->startButton->setEnabled(externalExecuter->findApp()); ui->updateButton->show(); } @@ -83,7 +82,7 @@ void CommonButtonGroupWidget::startButtonActive(bool flag) void CommonButtonGroupWidget::on_updateButton_clicked() { - emit sigSendCommand("update"); + emit sigSendPacket(PacketType::TYPE_UPDATE); startUpdateState(); mainWindow->disableUnsaveButton(true); } diff --git a/Widgets/commonbuttongroupwidget.h b/Widgets/commonbuttongroupwidget.h index 130513e..07b33b4 100644 --- a/Widgets/commonbuttongroupwidget.h +++ b/Widgets/commonbuttongroupwidget.h @@ -29,7 +29,7 @@ public: ~CommonButtonGroupWidget(); signals: - void sigSendCommand(QString command); + void sigSendPacket(PacketType packet); void sigSendXMLAnswer(QString answer); private slots: diff --git a/Widgets/newversionwidget.cpp b/Widgets/newversionwidget.cpp index b8a8053..980781e 100644 --- a/Widgets/newversionwidget.cpp +++ b/Widgets/newversionwidget.cpp @@ -6,9 +6,8 @@ NewVersionWidget::NewVersionWidget(QWidget *parent) : ui(new Ui::NewVersionWidget) { ui->setupUi(this); - setWindowFlags(Qt::SubWindow | Qt::FramelessWindowHint | Qt::CustomizeWindowHint ); + setWindowFlags(Qt::SubWindow); setAttribute(Qt::WA_ShowModal,true); - setAttribute(Qt::WA_TranslucentBackground); } void NewVersionWidget::initialize(VersionSelectWidget *versionSelectWidget, QString prevName) diff --git a/Widgets/newversionwidget.ui b/Widgets/newversionwidget.ui index f22cea3..9ba102e 100644 --- a/Widgets/newversionwidget.ui +++ b/Widgets/newversionwidget.ui @@ -6,8 +6,8 @@ 0 0 - 310 - 152 + 325 + 200 @@ -25,220 +25,194 @@ - - - true - - - - 0 - 0 - 311 - 191 - - - - - 0 - 0 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - 0 - 0 - 311 - 51 - - - - - 5 + + + + + true - - 5 + + + 0 + 0 + - - 5 + + QFrame::StyledPanel - - 5 + + QFrame::Raised - - - - - 0 - 0 - - - - Базовая версия: - - - - - - - TextLabel - - - - - - - - - 0 - 50 - 311 - 51 - - - - - 6 - - - 5 - - - 5 - - - 20 - - - 5 - - - - - Новое название: - - - - - - - - 0 - 0 - - - - - 150 - 30 - - - - - 60 - 30 - - - - - - - - - - 0 - 100 - 311 - 51 - - - - - 6 - - - - - Qt::Horizontal - - - QSizePolicy::Minimum - - - - 40 - 20 - - - - - - - - - 0 - 0 - - - - Создать - - - - - - - Qt::Horizontal - - - QSizePolicy::Minimum - - - - 40 - 20 - - - - - - - - - 0 - 0 - - - - Отмена - - - - - - - Qt::Horizontal - - - QSizePolicy::Minimum - - - - 40 - 20 - - - - - - - + + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + + 0 + 0 + + + + Базовая версия: + + + + + + + TextLabel + + + + + + + + + 6 + + + 5 + + + 5 + + + 20 + + + 5 + + + + + Новое название: + + + + + + + + 0 + 0 + + + + + 150 + 30 + + + + + 60 + 30 + + + + + + + + + + 6 + + + + + Qt::Horizontal + + + QSizePolicy::Minimum + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + Создать + + + + + + + Qt::Horizontal + + + QSizePolicy::Minimum + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + Отмена + + + + + + + Qt::Horizontal + + + QSizePolicy::Minimum + + + + 40 + 20 + + + + + + + + + + diff --git a/Widgets/versionselectwidget.cpp b/Widgets/versionselectwidget.cpp index 82a3fcf..afbb006 100644 --- a/Widgets/versionselectwidget.cpp +++ b/Widgets/versionselectwidget.cpp @@ -90,7 +90,7 @@ void VersionSelectWidget::on_switchServerVersionButton_clicked() return; } - versionContainer->setServerVersonData(selectedVersion); + versionContainer->setServerVersionData(selectedVersion); ui->verValue->setText(selectedVersion->getViewName()); emit sigSendSwitchVersion(selectedVersion); } diff --git a/debug/RRJClient.exe b/debug/RRJClient.exe index b412e8e..3e56268 100644 Binary files a/debug/RRJClient.exe and b/debug/RRJClient.exe differ diff --git a/debug/commonbuttongroupwidget.o b/debug/commonbuttongroupwidget.o index 5190fc1..00f049f 100644 Binary files a/debug/commonbuttongroupwidget.o and b/debug/commonbuttongroupwidget.o differ diff --git a/debug/mainwindow.o b/debug/mainwindow.o index a097329..ffba6ba 100644 Binary files a/debug/mainwindow.o and b/debug/mainwindow.o differ diff --git a/debug/moc_commonbuttongroupwidget.cpp b/debug/moc_commonbuttongroupwidget.cpp index ffabb27..558a0e4 100644 --- a/debug/moc_commonbuttongroupwidget.cpp +++ b/debug/moc_commonbuttongroupwidget.cpp @@ -22,8 +22,8 @@ QT_BEGIN_MOC_NAMESPACE QT_WARNING_PUSH QT_WARNING_DISABLE_DEPRECATED struct qt_meta_stringdata_CommonButtonGroupWidget_t { - QByteArrayData data[8]; - char stringdata0[119]; + QByteArrayData data[9]; + char stringdata0[128]; }; #define QT_MOC_LITERAL(idx, ofs, len) \ Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ @@ -33,18 +33,20 @@ struct qt_meta_stringdata_CommonButtonGroupWidget_t { static const qt_meta_stringdata_CommonButtonGroupWidget_t qt_meta_stringdata_CommonButtonGroupWidget = { { QT_MOC_LITERAL(0, 0, 23), // "CommonButtonGroupWidget" -QT_MOC_LITERAL(1, 24, 14), // "sigSendCommand" -QT_MOC_LITERAL(2, 39, 0), // "" -QT_MOC_LITERAL(3, 40, 7), // "command" -QT_MOC_LITERAL(4, 48, 16), // "sigSendXMLAnswer" -QT_MOC_LITERAL(5, 65, 6), // "answer" -QT_MOC_LITERAL(6, 72, 23), // "on_updateButton_clicked" -QT_MOC_LITERAL(7, 96, 22) // "on_startButton_clicked" +QT_MOC_LITERAL(1, 24, 13), // "sigSendPacket" +QT_MOC_LITERAL(2, 38, 0), // "" +QT_MOC_LITERAL(3, 39, 10), // "PacketType" +QT_MOC_LITERAL(4, 50, 6), // "packet" +QT_MOC_LITERAL(5, 57, 16), // "sigSendXMLAnswer" +QT_MOC_LITERAL(6, 74, 6), // "answer" +QT_MOC_LITERAL(7, 81, 23), // "on_updateButton_clicked" +QT_MOC_LITERAL(8, 105, 22) // "on_startButton_clicked" }, - "CommonButtonGroupWidget\0sigSendCommand\0" - "\0command\0sigSendXMLAnswer\0answer\0" - "on_updateButton_clicked\0on_startButton_clicked" + "CommonButtonGroupWidget\0sigSendPacket\0" + "\0PacketType\0packet\0sigSendXMLAnswer\0" + "answer\0on_updateButton_clicked\0" + "on_startButton_clicked" }; #undef QT_MOC_LITERAL @@ -63,15 +65,15 @@ static const uint qt_meta_data_CommonButtonGroupWidget[] = { // signals: name, argc, parameters, tag, flags 1, 1, 34, 2, 0x06 /* Public */, - 4, 1, 37, 2, 0x06 /* Public */, + 5, 1, 37, 2, 0x06 /* Public */, // slots: name, argc, parameters, tag, flags - 6, 0, 40, 2, 0x08 /* Private */, - 7, 0, 41, 2, 0x08 /* Private */, + 7, 0, 40, 2, 0x08 /* Private */, + 8, 0, 41, 2, 0x08 /* Private */, // signals: parameters - QMetaType::Void, QMetaType::QString, 3, - QMetaType::Void, QMetaType::QString, 5, + QMetaType::Void, 0x80000000 | 3, 4, + QMetaType::Void, QMetaType::QString, 6, // slots: parameters QMetaType::Void, @@ -86,7 +88,7 @@ void CommonButtonGroupWidget::qt_static_metacall(QObject *_o, QMetaObject::Call auto *_t = static_cast(_o); Q_UNUSED(_t) switch (_id) { - case 0: _t->sigSendCommand((*reinterpret_cast< QString(*)>(_a[1]))); break; + case 0: _t->sigSendPacket((*reinterpret_cast< PacketType(*)>(_a[1]))); break; case 1: _t->sigSendXMLAnswer((*reinterpret_cast< QString(*)>(_a[1]))); break; case 2: _t->on_updateButton_clicked(); break; case 3: _t->on_startButton_clicked(); break; @@ -95,8 +97,8 @@ void CommonButtonGroupWidget::qt_static_metacall(QObject *_o, QMetaObject::Call } else if (_c == QMetaObject::IndexOfMethod) { int *result = reinterpret_cast(_a[0]); { - using _t = void (CommonButtonGroupWidget::*)(QString ); - if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&CommonButtonGroupWidget::sigSendCommand)) { + using _t = void (CommonButtonGroupWidget::*)(PacketType ); + if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&CommonButtonGroupWidget::sigSendPacket)) { *result = 0; return; } @@ -152,7 +154,7 @@ int CommonButtonGroupWidget::qt_metacall(QMetaObject::Call _c, int _id, void **_ } // SIGNAL 0 -void CommonButtonGroupWidget::sigSendCommand(QString _t1) +void CommonButtonGroupWidget::sigSendPacket(PacketType _t1) { void *_a[] = { nullptr, const_cast(reinterpret_cast(std::addressof(_t1))) }; QMetaObject::activate(this, &staticMetaObject, 0, _a); diff --git a/debug/moc_commonbuttongroupwidget.o b/debug/moc_commonbuttongroupwidget.o index 05fed59..2ae7b4d 100644 Binary files a/debug/moc_commonbuttongroupwidget.o and b/debug/moc_commonbuttongroupwidget.o differ diff --git a/debug/moc_mainwindow.cpp b/debug/moc_mainwindow.cpp index c90a225..5b2bde2 100644 --- a/debug/moc_mainwindow.cpp +++ b/debug/moc_mainwindow.cpp @@ -23,8 +23,8 @@ QT_BEGIN_MOC_NAMESPACE QT_WARNING_PUSH QT_WARNING_DISABLE_DEPRECATED struct qt_meta_stringdata_MainWindow_t { - QByteArrayData data[61]; - char stringdata0[934]; + QByteArrayData data[63]; + char stringdata0[961]; }; #define QT_MOC_LITERAL(idx, ofs, len) \ Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ @@ -56,44 +56,46 @@ QT_MOC_LITERAL(19, 247, 12), // "hashComparer" QT_MOC_LITERAL(20, 260, 10), // "TCPClient*" QT_MOC_LITERAL(21, 271, 9), // "tcpClient" QT_MOC_LITERAL(22, 281, 14), // "sigSendCommand" -QT_MOC_LITERAL(23, 296, 7), // "command" -QT_MOC_LITERAL(24, 304, 16), // "sigSendXMLAnswer" -QT_MOC_LITERAL(25, 321, 6), // "answer" -QT_MOC_LITERAL(26, 328, 22), // "sigUpdateFilesOnServer" -QT_MOC_LITERAL(27, 351, 16), // "QList*" -QT_MOC_LITERAL(28, 368, 12), // "fileSendList" -QT_MOC_LITERAL(29, 381, 13), // "sigSetConnect" -QT_MOC_LITERAL(30, 395, 15), // "ServerSettings*" -QT_MOC_LITERAL(31, 411, 14), // "serverSettings" -QT_MOC_LITERAL(32, 426, 16), // "sigCalculateHash" -QT_MOC_LITERAL(33, 443, 19), // "sigSendAutorization" -QT_MOC_LITERAL(34, 463, 15), // "sigGetConnected" -QT_MOC_LITERAL(35, 479, 14), // "showUpdateInfo" -QT_MOC_LITERAL(36, 494, 21), // "showCompleteDialogBox" -QT_MOC_LITERAL(37, 516, 19), // "slotConnectionState" -QT_MOC_LITERAL(38, 536, 4), // "flag" -QT_MOC_LITERAL(39, 541, 20), // "slotServerDisconnect" -QT_MOC_LITERAL(40, 562, 14), // "updateProgress" -QT_MOC_LITERAL(41, 577, 12), // "loadComplete" -QT_MOC_LITERAL(42, 590, 14), // "lostConnection" -QT_MOC_LITERAL(43, 605, 13), // "serverBlocked" -QT_MOC_LITERAL(44, 619, 16), // "checkLoginResult" -QT_MOC_LITERAL(45, 636, 20), // "ServerAuthorization*" -QT_MOC_LITERAL(46, 657, 10), // "serverAuth" -QT_MOC_LITERAL(47, 668, 13), // "setNeedUpdate" -QT_MOC_LITERAL(48, 682, 4), // "size" -QT_MOC_LITERAL(49, 687, 9), // "fileCount" -QT_MOC_LITERAL(50, 697, 11), // "deleteCount" -QT_MOC_LITERAL(51, 709, 20), // "showServerListWidget" -QT_MOC_LITERAL(52, 730, 29), // "QList*" -QT_MOC_LITERAL(53, 760, 10), // "serverData" -QT_MOC_LITERAL(54, 771, 25), // "on_settingsButton_clicked" -QT_MOC_LITERAL(55, 797, 29), // "on_languageComboBox_activated" -QT_MOC_LITERAL(56, 827, 4), // "arg1" -QT_MOC_LITERAL(57, 832, 17), // "slotDisableNotify" -QT_MOC_LITERAL(58, 850, 21), // "on_exitButton_clicked" -QT_MOC_LITERAL(59, 872, 29), // "on_offlineStartButton_clicked" -QT_MOC_LITERAL(60, 902, 31) // "on_unsafeChangingButton_clicked" +QT_MOC_LITERAL(23, 296, 10), // "PacketType" +QT_MOC_LITERAL(24, 307, 10), // "packetType" +QT_MOC_LITERAL(25, 318, 16), // "sigSendXMLAnswer" +QT_MOC_LITERAL(26, 335, 6), // "answer" +QT_MOC_LITERAL(27, 342, 22), // "sigUpdateFilesOnServer" +QT_MOC_LITERAL(28, 365, 16), // "QList*" +QT_MOC_LITERAL(29, 382, 12), // "fileSendList" +QT_MOC_LITERAL(30, 395, 13), // "sigSetConnect" +QT_MOC_LITERAL(31, 409, 15), // "ServerSettings*" +QT_MOC_LITERAL(32, 425, 14), // "serverSettings" +QT_MOC_LITERAL(33, 440, 16), // "sigCalculateHash" +QT_MOC_LITERAL(34, 457, 19), // "sigSendAutorization" +QT_MOC_LITERAL(35, 477, 12), // "sigSendCheck" +QT_MOC_LITERAL(36, 490, 15), // "sigGetConnected" +QT_MOC_LITERAL(37, 506, 14), // "showUpdateInfo" +QT_MOC_LITERAL(38, 521, 21), // "showCompleteDialogBox" +QT_MOC_LITERAL(39, 543, 19), // "slotConnectionState" +QT_MOC_LITERAL(40, 563, 4), // "flag" +QT_MOC_LITERAL(41, 568, 20), // "slotServerDisconnect" +QT_MOC_LITERAL(42, 589, 14), // "updateProgress" +QT_MOC_LITERAL(43, 604, 12), // "loadComplete" +QT_MOC_LITERAL(44, 617, 14), // "lostConnection" +QT_MOC_LITERAL(45, 632, 13), // "serverBlocked" +QT_MOC_LITERAL(46, 646, 16), // "checkLoginResult" +QT_MOC_LITERAL(47, 663, 20), // "ServerAuthorization*" +QT_MOC_LITERAL(48, 684, 10), // "serverAuth" +QT_MOC_LITERAL(49, 695, 13), // "setNeedUpdate" +QT_MOC_LITERAL(50, 709, 4), // "size" +QT_MOC_LITERAL(51, 714, 9), // "fileCount" +QT_MOC_LITERAL(52, 724, 11), // "deleteCount" +QT_MOC_LITERAL(53, 736, 20), // "showServerListWidget" +QT_MOC_LITERAL(54, 757, 29), // "QList*" +QT_MOC_LITERAL(55, 787, 10), // "serverData" +QT_MOC_LITERAL(56, 798, 25), // "on_settingsButton_clicked" +QT_MOC_LITERAL(57, 824, 29), // "on_languageComboBox_activated" +QT_MOC_LITERAL(58, 854, 4), // "arg1" +QT_MOC_LITERAL(59, 859, 17), // "slotDisableNotify" +QT_MOC_LITERAL(60, 877, 21), // "on_exitButton_clicked" +QT_MOC_LITERAL(61, 899, 29), // "on_offlineStartButton_clicked" +QT_MOC_LITERAL(62, 929, 31) // "on_unsafeChangingButton_clicked" }, "MainWindow\0sigInitializeClient\0\0" @@ -104,20 +106,21 @@ QT_MOC_LITERAL(60, 902, 31) // "on_unsafeChangingButton_clicked" "UpdateController*\0updateController\0" "DataParser*\0dataParser\0HashComparer*\0" "hashComparer\0TCPClient*\0tcpClient\0" - "sigSendCommand\0command\0sigSendXMLAnswer\0" - "answer\0sigUpdateFilesOnServer\0" + "sigSendCommand\0PacketType\0packetType\0" + "sigSendXMLAnswer\0answer\0sigUpdateFilesOnServer\0" "QList*\0fileSendList\0" "sigSetConnect\0ServerSettings*\0" "serverSettings\0sigCalculateHash\0" - "sigSendAutorization\0sigGetConnected\0" - "showUpdateInfo\0showCompleteDialogBox\0" - "slotConnectionState\0flag\0slotServerDisconnect\0" - "updateProgress\0loadComplete\0lostConnection\0" - "serverBlocked\0checkLoginResult\0" - "ServerAuthorization*\0serverAuth\0" - "setNeedUpdate\0size\0fileCount\0deleteCount\0" - "showServerListWidget\0QList*\0" - "serverData\0on_settingsButton_clicked\0" + "sigSendAutorization\0sigSendCheck\0" + "sigGetConnected\0showUpdateInfo\0" + "showCompleteDialogBox\0slotConnectionState\0" + "flag\0slotServerDisconnect\0updateProgress\0" + "loadComplete\0lostConnection\0serverBlocked\0" + "checkLoginResult\0ServerAuthorization*\0" + "serverAuth\0setNeedUpdate\0size\0fileCount\0" + "deleteCount\0showServerListWidget\0" + "QList*\0serverData\0" + "on_settingsButton_clicked\0" "on_languageComboBox_activated\0arg1\0" "slotDisableNotify\0on_exitButton_clicked\0" "on_offlineStartButton_clicked\0" @@ -131,50 +134,52 @@ static const uint qt_meta_data_MainWindow[] = { 8, // revision 0, // classname 0, 0, // classinfo - 26, 14, // methods + 27, 14, // methods 0, 0, // properties 0, 0, // enums/sets 0, 0, // constructors 0, // flags - 9, // signalCount + 10, // signalCount // signals: name, argc, parameters, tag, flags - 1, 5, 144, 2, 0x06 /* Public */, - 13, 5, 155, 2, 0x06 /* Public */, - 22, 1, 166, 2, 0x06 /* Public */, - 24, 1, 169, 2, 0x06 /* Public */, - 26, 1, 172, 2, 0x06 /* Public */, - 29, 2, 175, 2, 0x06 /* Public */, - 32, 0, 180, 2, 0x06 /* Public */, - 33, 0, 181, 2, 0x06 /* Public */, - 34, 0, 182, 2, 0x06 /* Public */, + 1, 5, 149, 2, 0x06 /* Public */, + 13, 5, 160, 2, 0x06 /* Public */, + 22, 1, 171, 2, 0x06 /* Public */, + 25, 1, 174, 2, 0x06 /* Public */, + 27, 1, 177, 2, 0x06 /* Public */, + 30, 2, 180, 2, 0x06 /* Public */, + 33, 0, 185, 2, 0x06 /* Public */, + 34, 0, 186, 2, 0x06 /* Public */, + 35, 0, 187, 2, 0x06 /* Public */, + 36, 0, 188, 2, 0x06 /* Public */, // slots: name, argc, parameters, tag, flags - 35, 0, 183, 2, 0x0a /* Public */, - 36, 0, 184, 2, 0x0a /* Public */, - 37, 1, 185, 2, 0x0a /* Public */, - 39, 0, 188, 2, 0x0a /* Public */, - 40, 0, 189, 2, 0x0a /* Public */, - 41, 0, 190, 2, 0x0a /* Public */, - 42, 0, 191, 2, 0x0a /* Public */, - 43, 0, 192, 2, 0x0a /* Public */, - 44, 1, 193, 2, 0x0a /* Public */, - 47, 4, 196, 2, 0x0a /* Public */, - 51, 1, 205, 2, 0x0a /* Public */, - 54, 0, 208, 2, 0x08 /* Private */, - 55, 1, 209, 2, 0x08 /* Private */, - 57, 0, 212, 2, 0x08 /* Private */, - 58, 0, 213, 2, 0x08 /* Private */, - 59, 0, 214, 2, 0x08 /* Private */, - 60, 0, 215, 2, 0x08 /* Private */, + 37, 0, 189, 2, 0x0a /* Public */, + 38, 0, 190, 2, 0x0a /* Public */, + 39, 1, 191, 2, 0x0a /* Public */, + 41, 0, 194, 2, 0x0a /* Public */, + 42, 0, 195, 2, 0x0a /* Public */, + 43, 0, 196, 2, 0x0a /* Public */, + 44, 0, 197, 2, 0x0a /* Public */, + 45, 0, 198, 2, 0x0a /* Public */, + 46, 1, 199, 2, 0x0a /* Public */, + 49, 4, 202, 2, 0x0a /* Public */, + 53, 1, 211, 2, 0x0a /* Public */, + 56, 0, 214, 2, 0x08 /* Private */, + 57, 1, 215, 2, 0x08 /* Private */, + 59, 0, 218, 2, 0x08 /* Private */, + 60, 0, 219, 2, 0x08 /* Private */, + 61, 0, 220, 2, 0x08 /* Private */, + 62, 0, 221, 2, 0x08 /* Private */, // signals: parameters QMetaType::Void, 0x80000000 | 3, 0x80000000 | 5, 0x80000000 | 7, 0x80000000 | 9, 0x80000000 | 11, 4, 6, 8, 10, 12, QMetaType::Void, 0x80000000 | 14, 0x80000000 | 16, 0x80000000 | 3, 0x80000000 | 18, 0x80000000 | 20, 15, 17, 4, 19, 21, - QMetaType::Void, QMetaType::QString, 23, - QMetaType::Void, QMetaType::QString, 25, - QMetaType::Void, 0x80000000 | 27, 28, - QMetaType::Void, 0x80000000 | 30, 0x80000000 | 11, 31, 12, + QMetaType::Void, 0x80000000 | 23, 24, + QMetaType::Void, QMetaType::QString, 26, + QMetaType::Void, 0x80000000 | 28, 29, + QMetaType::Void, 0x80000000 | 31, 0x80000000 | 11, 32, 12, + QMetaType::Void, QMetaType::Void, QMetaType::Void, QMetaType::Bool, @@ -182,17 +187,17 @@ static const uint qt_meta_data_MainWindow[] = { // slots: parameters QMetaType::Void, QMetaType::Void, - QMetaType::Void, QMetaType::Bool, 38, + QMetaType::Void, QMetaType::Bool, 40, QMetaType::Void, QMetaType::Void, QMetaType::Void, QMetaType::Void, QMetaType::Void, - QMetaType::Void, 0x80000000 | 45, 46, - QMetaType::Void, QMetaType::Bool, QMetaType::ULongLong, QMetaType::ULongLong, QMetaType::ULongLong, 38, 48, 49, 50, - QMetaType::Void, 0x80000000 | 52, 53, + QMetaType::Void, 0x80000000 | 47, 48, + QMetaType::Void, QMetaType::Bool, QMetaType::ULongLong, QMetaType::ULongLong, QMetaType::ULongLong, 40, 50, 51, 52, + QMetaType::Void, 0x80000000 | 54, 55, QMetaType::Void, - QMetaType::Void, QMetaType::QString, 56, + QMetaType::Void, QMetaType::QString, 58, QMetaType::Void, QMetaType::Void, QMetaType::Void, @@ -209,31 +214,32 @@ void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, switch (_id) { case 0: _t->sigInitializeClient((*reinterpret_cast< MainWindow*(*)>(_a[1])),(*reinterpret_cast< RecognizeSystem*(*)>(_a[2])),(*reinterpret_cast< ExternalExecuter*(*)>(_a[3])),(*reinterpret_cast< SendSystem*(*)>(_a[4])),(*reinterpret_cast< QThread*(*)>(_a[5]))); break; case 1: _t->sigRecognize((*reinterpret_cast< UpdateController*(*)>(_a[1])),(*reinterpret_cast< DataParser*(*)>(_a[2])),(*reinterpret_cast< MainWindow*(*)>(_a[3])),(*reinterpret_cast< HashComparer*(*)>(_a[4])),(*reinterpret_cast< TCPClient*(*)>(_a[5]))); break; - case 2: _t->sigSendCommand((*reinterpret_cast< QString(*)>(_a[1]))); break; + case 2: _t->sigSendCommand((*reinterpret_cast< PacketType(*)>(_a[1]))); break; case 3: _t->sigSendXMLAnswer((*reinterpret_cast< QString(*)>(_a[1]))); break; case 4: _t->sigUpdateFilesOnServer((*reinterpret_cast< QList*(*)>(_a[1]))); break; case 5: _t->sigSetConnect((*reinterpret_cast< ServerSettings*(*)>(_a[1])),(*reinterpret_cast< QThread*(*)>(_a[2]))); break; case 6: _t->sigCalculateHash(); break; case 7: _t->sigSendAutorization(); break; - case 8: { bool _r = _t->sigGetConnected(); + case 8: _t->sigSendCheck(); break; + case 9: { bool _r = _t->sigGetConnected(); if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = std::move(_r); } break; - case 9: _t->showUpdateInfo(); break; - case 10: _t->showCompleteDialogBox(); break; - case 11: _t->slotConnectionState((*reinterpret_cast< bool(*)>(_a[1]))); break; - case 12: _t->slotServerDisconnect(); break; - case 13: _t->updateProgress(); break; - case 14: _t->loadComplete(); break; - case 15: _t->lostConnection(); break; - case 16: _t->serverBlocked(); break; - case 17: _t->checkLoginResult((*reinterpret_cast< ServerAuthorization*(*)>(_a[1]))); break; - case 18: _t->setNeedUpdate((*reinterpret_cast< bool(*)>(_a[1])),(*reinterpret_cast< quint64(*)>(_a[2])),(*reinterpret_cast< quint64(*)>(_a[3])),(*reinterpret_cast< quint64(*)>(_a[4]))); break; - case 19: _t->showServerListWidget((*reinterpret_cast< QList*(*)>(_a[1]))); break; - case 20: _t->on_settingsButton_clicked(); break; - case 21: _t->on_languageComboBox_activated((*reinterpret_cast< const QString(*)>(_a[1]))); break; - case 22: _t->slotDisableNotify(); break; - case 23: _t->on_exitButton_clicked(); break; - case 24: _t->on_offlineStartButton_clicked(); break; - case 25: _t->on_unsafeChangingButton_clicked(); break; + case 10: _t->showUpdateInfo(); break; + case 11: _t->showCompleteDialogBox(); break; + case 12: _t->slotConnectionState((*reinterpret_cast< bool(*)>(_a[1]))); break; + case 13: _t->slotServerDisconnect(); break; + case 14: _t->updateProgress(); break; + case 15: _t->loadComplete(); break; + case 16: _t->lostConnection(); break; + case 17: _t->serverBlocked(); break; + case 18: _t->checkLoginResult((*reinterpret_cast< ServerAuthorization*(*)>(_a[1]))); break; + case 19: _t->setNeedUpdate((*reinterpret_cast< bool(*)>(_a[1])),(*reinterpret_cast< quint64(*)>(_a[2])),(*reinterpret_cast< quint64(*)>(_a[3])),(*reinterpret_cast< quint64(*)>(_a[4]))); break; + case 20: _t->showServerListWidget((*reinterpret_cast< QList*(*)>(_a[1]))); break; + case 21: _t->on_settingsButton_clicked(); break; + case 22: _t->on_languageComboBox_activated((*reinterpret_cast< const QString(*)>(_a[1]))); break; + case 23: _t->slotDisableNotify(); break; + case 24: _t->on_exitButton_clicked(); break; + case 25: _t->on_offlineStartButton_clicked(); break; + case 26: _t->on_unsafeChangingButton_clicked(); break; default: ; } } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { @@ -294,7 +300,7 @@ void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, } } { - using _t = void (MainWindow::*)(QString ); + using _t = void (MainWindow::*)(PacketType ); if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&MainWindow::sigSendCommand)) { *result = 2; return; @@ -335,10 +341,17 @@ void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, return; } } + { + using _t = void (MainWindow::*)(); + if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&MainWindow::sigSendCheck)) { + *result = 8; + return; + } + } { using _t = bool (MainWindow::*)(); if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&MainWindow::sigGetConnected)) { - *result = 8; + *result = 9; return; } } @@ -374,13 +387,13 @@ int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a) if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { - if (_id < 26) + if (_id < 27) qt_static_metacall(this, _c, _id, _a); - _id -= 26; + _id -= 27; } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { - if (_id < 26) + if (_id < 27) qt_static_metacall(this, _c, _id, _a); - _id -= 26; + _id -= 27; } return _id; } @@ -400,7 +413,7 @@ void MainWindow::sigRecognize(UpdateController * _t1, DataParser * _t2, MainWind } // SIGNAL 2 -void MainWindow::sigSendCommand(QString _t1) +void MainWindow::sigSendCommand(PacketType _t1) { void *_a[] = { nullptr, const_cast(reinterpret_cast(std::addressof(_t1))) }; QMetaObject::activate(this, &staticMetaObject, 2, _a); @@ -440,11 +453,17 @@ void MainWindow::sigSendAutorization() } // SIGNAL 8 +void MainWindow::sigSendCheck() +{ + QMetaObject::activate(this, &staticMetaObject, 8, nullptr); +} + +// SIGNAL 9 bool MainWindow::sigGetConnected() { bool _t0{}; void *_a[] = { const_cast(reinterpret_cast(std::addressof(_t0))) }; - QMetaObject::activate(this, &staticMetaObject, 8, _a); + QMetaObject::activate(this, &staticMetaObject, 9, _a); return _t0; } QT_WARNING_POP diff --git a/debug/moc_mainwindow.o b/debug/moc_mainwindow.o index 1b3e5ad..a872ed3 100644 Binary files a/debug/moc_mainwindow.o and b/debug/moc_mainwindow.o differ diff --git a/debug/moc_recognizesystem.o b/debug/moc_recognizesystem.o index 14cf8bf..c04d077 100644 Binary files a/debug/moc_recognizesystem.o and b/debug/moc_recognizesystem.o differ diff --git a/debug/moc_sendsystem.o b/debug/moc_sendsystem.o index 19ccd6e..a970aa9 100644 Binary files a/debug/moc_sendsystem.o and b/debug/moc_sendsystem.o differ diff --git a/debug/moc_tcpclient.cpp b/debug/moc_tcpclient.cpp index 77628f9..c9d0e9e 100644 --- a/debug/moc_tcpclient.cpp +++ b/debug/moc_tcpclient.cpp @@ -22,8 +22,8 @@ QT_BEGIN_MOC_NAMESPACE QT_WARNING_PUSH QT_WARNING_DISABLE_DEPRECATED struct qt_meta_stringdata_TCPClient_t { - QByteArrayData data[10]; - char stringdata0[127]; + QByteArrayData data[9]; + char stringdata0[111]; }; #define QT_MOC_LITERAL(idx, ofs, len) \ Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ @@ -39,15 +39,13 @@ QT_MOC_LITERAL(3, 27, 7), // "message" QT_MOC_LITERAL(4, 35, 19), // "sigServerDisconnect" QT_MOC_LITERAL(5, 55, 18), // "sigConnectionState" QT_MOC_LITERAL(6, 74, 4), // "flag" -QT_MOC_LITERAL(7, 79, 15), // "slotSendCommand" -QT_MOC_LITERAL(8, 95, 17), // "slotConnectNotify" -QT_MOC_LITERAL(9, 113, 13) // "slotReadyRead" +QT_MOC_LITERAL(7, 79, 17), // "slotConnectNotify" +QT_MOC_LITERAL(8, 97, 13) // "slotReadyRead" }, "TCPClient\0sigSendDebugLog\0\0message\0" "sigServerDisconnect\0sigConnectionState\0" - "flag\0slotSendCommand\0slotConnectNotify\0" - "slotReadyRead" + "flag\0slotConnectNotify\0slotReadyRead" }; #undef QT_MOC_LITERAL @@ -57,7 +55,7 @@ static const uint qt_meta_data_TCPClient[] = { 8, // revision 0, // classname 0, 0, // classinfo - 6, 14, // methods + 5, 14, // methods 0, 0, // properties 0, 0, // enums/sets 0, 0, // constructors @@ -65,14 +63,13 @@ static const uint qt_meta_data_TCPClient[] = { 3, // signalCount // signals: name, argc, parameters, tag, flags - 1, 1, 44, 2, 0x06 /* Public */, - 4, 0, 47, 2, 0x06 /* Public */, - 5, 1, 48, 2, 0x06 /* Public */, + 1, 1, 39, 2, 0x06 /* Public */, + 4, 0, 42, 2, 0x06 /* Public */, + 5, 1, 43, 2, 0x06 /* Public */, // slots: name, argc, parameters, tag, flags - 7, 1, 51, 2, 0x0a /* Public */, - 8, 0, 54, 2, 0x0a /* Public */, - 9, 0, 55, 2, 0x08 /* Private */, + 7, 0, 46, 2, 0x0a /* Public */, + 8, 0, 47, 2, 0x08 /* Private */, // signals: parameters QMetaType::Void, QMetaType::QString, 3, @@ -80,7 +77,6 @@ static const uint qt_meta_data_TCPClient[] = { QMetaType::Void, QMetaType::Bool, 6, // slots: parameters - QMetaType::Void, QMetaType::QString, 3, QMetaType::Void, QMetaType::Void, @@ -96,9 +92,8 @@ void TCPClient::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, v case 0: _t->sigSendDebugLog((*reinterpret_cast< QString(*)>(_a[1]))); break; case 1: _t->sigServerDisconnect(); break; case 2: _t->sigConnectionState((*reinterpret_cast< bool(*)>(_a[1]))); break; - case 3: _t->slotSendCommand((*reinterpret_cast< QString(*)>(_a[1]))); break; - case 4: _t->slotConnectNotify(); break; - case 5: _t->slotReadyRead(); break; + case 3: _t->slotConnectNotify(); break; + case 4: _t->slotReadyRead(); break; default: ; } } else if (_c == QMetaObject::IndexOfMethod) { @@ -156,13 +151,13 @@ int TCPClient::qt_metacall(QMetaObject::Call _c, int _id, void **_a) if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { - if (_id < 6) + if (_id < 5) qt_static_metacall(this, _c, _id, _a); - _id -= 6; + _id -= 5; } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { - if (_id < 6) + if (_id < 5) *reinterpret_cast(_a[0]) = -1; - _id -= 6; + _id -= 5; } return _id; } diff --git a/debug/moc_tcpclient.o b/debug/moc_tcpclient.o index 56b7dd3..84b6ff5 100644 Binary files a/debug/moc_tcpclient.o and b/debug/moc_tcpclient.o differ diff --git a/debug/moc_versioncontainer.o b/debug/moc_versioncontainer.o index f6ce5e0..5255491 100644 Binary files a/debug/moc_versioncontainer.o and b/debug/moc_versioncontainer.o differ diff --git a/debug/newversionwidget.o b/debug/newversionwidget.o index 95d629a..56733f5 100644 Binary files a/debug/newversionwidget.o and b/debug/newversionwidget.o differ diff --git a/debug/notifycontroller.o b/debug/notifycontroller.o index ff5d33b..ad5ab2e 100644 Binary files a/debug/notifycontroller.o and b/debug/notifycontroller.o differ diff --git a/debug/qrc_resources.cpp b/debug/qrc_resources.cpp index f1ae978..254888e 100644 --- a/debug/qrc_resources.cpp +++ b/debug/qrc_resources.cpp @@ -8,54 +8,62 @@ static const unsigned char qt_resource_data[] = { // D:/QT/Projects/RRJClient/style.css - 0x0,0x0,0x2,0xdd, + 0x0,0x0,0x3,0x60, 0x0, - 0x0,0xc,0xab,0x78,0x9c,0xd5,0x56,0x6b,0x6f,0xda,0x30,0x14,0xfd,0x8e,0xc4,0x7f, - 0xb0,0x8a,0x26,0xb5,0x12,0xb4,0x49,0x28,0x2d,0xcb,0xbe,0xd1,0xee,0xa9,0x51,0xad, - 0x6a,0xd7,0x7e,0x9c,0x9c,0xf8,0x36,0xb1,0x30,0x36,0xb2,0x9d,0x52,0x34,0xed,0xbf, - 0xcf,0x24,0x81,0xbc,0x21,0x7d,0x68,0xd2,0x8,0xe2,0x11,0x3b,0xe7,0x1e,0xfb,0x9e, - 0x7b,0xae,0xbb,0x9d,0xeb,0x29,0xa6,0xfc,0x9e,0x72,0x22,0x96,0xdd,0xce,0xef,0x6e, - 0x7,0x99,0x97,0x87,0xfd,0x59,0x20,0x45,0xc4,0xc9,0x80,0xce,0x71,0x0,0x2e,0x8a, - 0x24,0x3b,0x74,0x4f,0x24,0x28,0x11,0x49,0x1f,0x4e,0x6e,0x6e,0xbe,0xfd,0xca,0x26, - 0x5d,0x62,0x39,0xbb,0x99,0x1e,0x2f,0x78,0x70,0xf4,0xa1,0x2,0xb0,0x10,0x8a,0x6a, - 0x2a,0xb8,0x8b,0x7c,0xe0,0x1a,0xa4,0x99,0xf1,0xa7,0xdb,0xe9,0x76,0xae,0x3f,0x49, - 0x3c,0x87,0x5e,0x36,0xf3,0xe7,0x82,0x60,0xd,0xff,0x96,0xc3,0x77,0xaa,0xf4,0x3d, - 0x25,0x1,0xe8,0x5e,0x14,0x87,0xcf,0x6e,0xd4,0x11,0xf1,0x5,0x13,0xd2,0x45,0x32, - 0xf0,0xf0,0xe1,0xd8,0xee,0x27,0x6f,0x7b,0x6c,0x6d,0x42,0x26,0xe3,0xcb,0x90,0x6a, - 0x28,0x2d,0xf3,0xa,0x96,0x77,0x20,0x27,0x5b,0xa8,0x66,0xf4,0x18,0xdc,0xea,0xaf, - 0xaf,0xf7,0xd6,0xbb,0xa3,0x8c,0x2a,0xf6,0x80,0xf5,0xa6,0xe2,0x91,0x42,0xfc,0xb3, - 0x15,0xc2,0x28,0x8f,0x70,0x21,0xe6,0x9e,0x98,0x88,0xa7,0xdd,0x2b,0x3b,0x74,0xac, - 0x61,0xdf,0x71,0xc6,0x7d,0x67,0x34,0xda,0x6e,0xa5,0x90,0x4,0xe4,0x40,0xe9,0x15, - 0x33,0x79,0x10,0x91,0x56,0xa0,0x8b,0x43,0x12,0x13,0x1a,0x29,0x17,0xd,0x17,0x4f, - 0xe9,0xc0,0x83,0xe0,0x7a,0xf0,0x80,0xe7,0x94,0xad,0x5c,0x74,0x70,0x81,0x19,0xf5, - 0x24,0x3d,0xc8,0xd,0xba,0xc8,0x3e,0xdb,0xce,0xce,0xc5,0x3f,0x1d,0xf5,0xc7,0xa7, - 0x7d,0x7b,0x68,0x65,0xcc,0x7f,0x44,0x2a,0x9c,0x44,0x5a,0xb,0xfe,0x3f,0x73,0x77, - 0x9,0x55,0xd8,0x63,0xb0,0x23,0xf9,0x88,0xd1,0x20,0xd4,0x9f,0x25,0x5e,0x15,0xb1, - 0x3,0x73,0x67,0x3,0x38,0x5,0xa5,0x4c,0x3d,0xec,0x4e,0x64,0x51,0x83,0xd9,0x23, - 0xe8,0xba,0x28,0x9e,0x16,0x2b,0x75,0xac,0xf2,0x4a,0x3d,0x66,0xe2,0xd5,0x82,0xd7, - 0x25,0xaa,0xb8,0xc9,0xce,0x16,0x6c,0x81,0x9,0xa1,0x3c,0x70,0x91,0x75,0xec,0xc0, - 0x7c,0xfb,0x39,0xdc,0xfc,0x4e,0xa7,0xcd,0x29,0x1f,0x2c,0x29,0xd1,0xa1,0x8b,0xce, - 0x13,0x26,0x9b,0xd2,0xe5,0xf0,0x91,0x50,0x5d,0xe,0xd4,0x3a,0xd1,0x69,0x7a,0xa4, - 0x8,0x8c,0xa5,0xa8,0x9,0x96,0x25,0xa4,0x98,0x2b,0x52,0x82,0x51,0x52,0xcd,0x6d, - 0xd,0xea,0xa8,0x69,0x9b,0xda,0x2a,0xca,0x0,0x18,0x4c,0x46,0xd2,0xbb,0x1a,0x9e, - 0xf4,0xc0,0x4c,0xc,0x2a,0xb6,0x55,0xa4,0xed,0xba,0x7e,0x18,0xf1,0x59,0xd3,0x86, - 0x67,0xb4,0x5a,0x95,0x4c,0x6a,0x15,0x21,0xf8,0xb3,0xbc,0xc2,0xf2,0xfc,0x1b,0xe8, - 0x8f,0xcb,0xeb,0x2f,0x6a,0x30,0xb5,0x59,0xea,0xb,0x5e,0x36,0xd8,0x84,0x70,0xbd, - 0xcb,0x7f,0x35,0xf3,0xd5,0xc9,0x82,0x61,0xe,0xb1,0xb9,0x23,0x2b,0xbd,0x94,0x96, - 0xa0,0xfd,0x70,0xf3,0xbd,0x11,0x55,0xa3,0xd3,0xbf,0x5e,0xf6,0xc5,0xf5,0xdc,0x9a, - 0xf4,0xac,0xf5,0xd7,0xa3,0x9c,0x19,0x29,0xae,0xff,0x5e,0x82,0x17,0x5,0xfb,0xfa, - 0x46,0x62,0xcc,0x5b,0x11,0xb5,0x11,0x46,0xbb,0x9d,0xd,0x1,0x9b,0x6d,0xdc,0xd7, - 0xbc,0x1a,0x53,0x5e,0x68,0x83,0xed,0x5a,0x60,0xe,0xe7,0x65,0x8e,0x6b,0xe7,0xb, - 0x3a,0x89,0x89,0x5e,0xce,0xc0,0x2a,0x57,0xe6,0x5b,0x30,0x78,0x13,0xc3,0xac,0x6f, - 0xd,0xd3,0x95,0x39,0x76,0x7d,0x89,0xb3,0x96,0x26,0xef,0xd9,0xa1,0xaa,0xd2,0x68, - 0xe8,0x42,0xc9,0xe9,0xc1,0x54,0x51,0x10,0x99,0x2a,0xbb,0xa5,0x9a,0x41,0xbb,0x38, - 0xb5,0x8a,0x4b,0xd0,0xae,0x84,0xa6,0xf,0xd4,0xc7,0xeb,0x7a,0x7b,0x6,0xf3,0x3a, - 0xc4,0x75,0x3d,0x9,0xc1,0x92,0xd6,0xd1,0x33,0x7d,0xd2,0x14,0xfc,0xea,0x8e,0xc2, - 0xb2,0xe2,0xc9,0xa7,0xaf,0xf2,0xe4,0xfa,0x67,0xf6,0x74,0xcf,0x7a,0x66,0xc6,0x75, - 0x8d,0x47,0xee,0x6c,0xe6,0xeb,0x68,0xf6,0xc8,0x9c,0x10,0xcf,0xcf,0x8c,0x3a,0xed, - 0xa3,0xbd,0xab,0x6d,0x73,0x42,0xa8,0x1,0xdd,0xb1,0xbe,0xea,0x29,0xa4,0x97,0xf2, - 0x8e,0x33,0xd6,0xe6,0x50,0x55,0xb0,0xac,0xa,0x9a,0xf1,0xbe,0xd9,0xb3,0x51,0x5a, - 0x6a,0xc4,0x63,0x51,0x4e,0x21,0x7f,0x1,0xf0,0x87,0xaf,0xf, + 0x0,0xf,0x7c,0x78,0x9c,0xd5,0x57,0xed,0x6e,0xda,0x30,0x14,0xfd,0x8f,0xc4,0x3b, + 0x44,0x45,0x93,0x4a,0x15,0x4a,0x8,0xd0,0xa2,0xec,0x1f,0xed,0x3e,0x35,0xaa,0x55, + 0xed,0xda,0x9f,0x93,0x93,0xb8,0x89,0x85,0xb1,0x91,0xe3,0x14,0xd0,0x34,0x69,0x7b, + 0xa5,0x49,0x93,0xba,0x49,0xeb,0x33,0xd0,0x37,0xda,0x25,0x9,0xf9,0x20,0x1,0x42, + 0x37,0x4d,0x6b,0x69,0x80,0x26,0xf6,0xf1,0xb9,0xbe,0xe7,0x1e,0xdf,0x56,0x2b,0xe7, + 0x3,0x44,0xd8,0x35,0x61,0x36,0x9f,0x54,0x2b,0x9f,0xaa,0x15,0x5,0x7e,0x4c,0x64, + 0xd,0x1d,0xc1,0x7d,0x66,0x37,0xc8,0x8,0x39,0xd8,0x50,0x7c,0x41,0xf7,0x8d,0xa6, + 0xc0,0x1e,0xf7,0x85,0x85,0x9b,0x17,0x17,0x6f,0x3f,0x26,0x83,0x4e,0x91,0x18,0x5e, + 0xc,0xe,0xc7,0xcc,0xa9,0x3f,0xcf,0x1,0x8c,0xb9,0x47,0x24,0xe1,0xcc,0x50,0x2c, + 0xcc,0x24,0x16,0x30,0xe2,0x73,0xb5,0x52,0xad,0x9c,0xbf,0x14,0x68,0x84,0x6b,0xc9, + 0xc8,0xf,0x63,0x1b,0x49,0xfc,0x6f,0x39,0xbc,0x23,0x9e,0xbc,0x26,0xb6,0x83,0x65, + 0xcd,0xf,0x96,0x4f,0x6e,0x14,0x11,0xb1,0x38,0xe5,0xc2,0x50,0x84,0x63,0xa2,0xfd, + 0x5e,0x4b,0xd,0x7f,0x5b,0x3d,0x6d,0xb9,0x64,0xf8,0x7c,0xe2,0x12,0x89,0x93,0x25, + 0x90,0x89,0x69,0x6d,0xc0,0x6f,0x9,0xe,0xbe,0xae,0xc7,0xd,0x60,0x35,0x75,0xf1, + 0xea,0x6a,0xcf,0xea,0x31,0xc2,0x9,0x1f,0x99,0xbc,0xcf,0xa7,0x9b,0x19,0xed,0xeb, + 0x5a,0x5b,0xd5,0xf5,0x9e,0xaa,0x77,0xbb,0xf1,0x16,0x70,0x61,0x63,0xd1,0xf0,0xe4, + 0x8c,0xc2,0xfe,0x71,0x5f,0x7a,0x58,0x66,0x1f,0x9,0x64,0x13,0xdf,0x33,0x94,0xf6, + 0x78,0x1a,0x3d,0xb8,0xe1,0x4c,0x36,0x6e,0xd0,0x88,0xd0,0x99,0xa1,0xec,0x9d,0x20, + 0x4a,0x4c,0x41,0xf6,0x52,0xf,0xd,0xa5,0x75,0x14,0x8f,0x4e,0xad,0xdf,0xe9,0xaa, + 0xbd,0x8e,0xda,0x6a,0x6b,0x9,0xf3,0xf7,0xbe,0xe7,0xf6,0x7d,0x29,0x39,0x7b,0xca, + 0xdc,0xd,0x9b,0x78,0xc8,0xa4,0xd8,0xde,0x10,0x4,0x25,0x8e,0x2b,0x5f,0x9,0x34, + 0xcb,0x62,0x3b,0x70,0x67,0x9,0x38,0xc0,0x9e,0x7,0x3a,0x2e,0x91,0xc8,0x8e,0xa6, + 0x46,0x57,0x42,0x27,0x99,0xad,0x9c,0x67,0x75,0x14,0xc5,0xd5,0x5b,0x8d,0xcb,0xa4, + 0x80,0x5e,0x38,0xbf,0x7c,0x5a,0xf4,0xae,0x1a,0x5d,0xf5,0x62,0xf0,0x24,0x1d,0x40, + 0x61,0x3c,0x55,0x3c,0x4e,0x89,0x1d,0x84,0x5d,0x9c,0x2b,0x3d,0x66,0x39,0x46,0xb6, + 0x4d,0x98,0x63,0x28,0xda,0xa1,0x8e,0x47,0xf1,0x7b,0x7b,0xf9,0x3d,0x1a,0x36,0x22, + 0xac,0x31,0x21,0xb6,0x74,0xd,0xe5,0x58,0xb,0x26,0x2f,0x2b,0x97,0xe1,0x17,0x36, + 0x49,0x95,0xe9,0x8e,0x7a,0x89,0xb2,0x2c,0xb8,0x3,0x8e,0xe2,0xf5,0x91,0x58,0x41, + 0xa,0xb8,0x46,0xf1,0xe4,0x24,0x52,0x80,0xda,0x5d,0xb7,0xff,0x65,0x85,0x9,0x0, + 0x80,0x49,0xed,0xe8,0xae,0xc4,0x53,0xd9,0x80,0x81,0x4e,0xce,0xb5,0xb2,0xb4,0xd, + 0xc3,0x72,0x7d,0x36,0x5c,0xdd,0x87,0x3c,0xad,0x52,0x95,0x17,0x39,0x8e,0x8b,0xad, + 0x61,0x5a,0xa8,0x69,0xfe,0x6b,0xe8,0xe7,0xf4,0x97,0xb5,0xc1,0xc8,0x65,0x89,0xc5, + 0xd9,0xaa,0xbf,0x86,0x84,0x8b,0x4d,0xfe,0xd,0x8c,0xf7,0x9a,0x63,0x8a,0x18,0xe, + 0xbc,0x5d,0xd1,0xa2,0x97,0x27,0x5,0x96,0x96,0xbb,0xfc,0x5c,0x8a,0x6a,0xad,0xd1, + 0xe7,0x4a,0x66,0x4b,0x3a,0x74,0x6d,0x73,0x3c,0x97,0x90,0x9e,0x85,0xfe,0x6a,0x84, + 0x51,0x90,0xe2,0xe2,0xcf,0x53,0x6c,0xfa,0xce,0xb6,0x63,0x23,0xf4,0xf7,0x58,0x44, + 0x65,0x84,0x51,0x6e,0x67,0x5d,0x8c,0x60,0x1b,0xb7,0x9d,0x5d,0x6b,0x53,0x9e,0x39, + 0x5,0xcb,0x9d,0x80,0x29,0x9c,0xc7,0x19,0x77,0x2b,0x5d,0xd0,0xe1,0x9a,0xca,0xe3, + 0x19,0x68,0xab,0x95,0xf9,0x37,0x18,0x14,0x99,0xed,0xce,0xca,0x29,0x3e,0x61,0x6, + 0x33,0xe8,0xba,0x5e,0x7,0x59,0x8b,0x92,0xb7,0xf3,0x52,0x79,0x69,0xac,0x39,0xcc, + 0xc2,0x26,0x4,0xaa,0xc8,0xf1,0xa1,0xca,0x2e,0x89,0xa4,0xb8,0xdc,0x3a,0x85,0x8a, + 0xb,0xd1,0xce,0xb8,0x24,0x37,0xc4,0x42,0x8b,0x7a,0xdb,0x81,0x79,0x11,0xe2,0xa2, + 0x9e,0x38,0xa7,0xe1,0x99,0x54,0x83,0xe3,0x16,0xa,0x7e,0x76,0x45,0xf0,0x24,0xe7, + 0xc9,0x9d,0x3f,0xf2,0xe4,0xe2,0x39,0x39,0x6d,0xad,0x54,0x7a,0x21,0x33,0x70,0x5d, + 0xf0,0xc8,0x8d,0x3d,0xc1,0x62,0xb5,0x56,0x17,0x1a,0xc4,0xe3,0x23,0x50,0x67,0xab, + 0xbe,0x35,0xda,0x32,0x8d,0x46,0x1,0xe8,0x86,0xf8,0xf2,0xcd,0x4c,0x2d,0xe2,0x1d, + 0x64,0xac,0x4c,0x13,0x90,0xb1,0xac,0x1c,0x1a,0x78,0xdf,0x70,0x67,0x94,0x92,0x1a, + 0x31,0xa9,0x1f,0x67,0xa1,0x79,0xa0,0xcc,0xef,0xe7,0x3f,0xe7,0xbf,0xe6,0xf7,0xca, + 0xe2,0x6d,0xfe,0xd,0xae,0x1f,0xa,0x7c,0x7c,0x7f,0xf8,0xf2,0xf0,0x75,0x7e,0x37, + 0xbf,0x3b,0x68,0xc6,0xff,0x54,0x9c,0xe1,0xc9,0x15,0x16,0xfd,0x98,0xc8,0x16,0x3f, + 0x2c,0xea,0xb7,0x42,0x8d,0x8f,0x5,0xbe,0x5,0xa4,0x6c,0xc1,0x2c,0xd9,0x65,0x8f, + 0x77,0x23,0x2a,0xc6,0x82,0xe9,0x57,0x8,0x22,0x79,0xc4,0x74,0x86,0x27,0x67,0x10, + 0xe,0x20,0x78,0x50,0x63,0xbb,0x93,0x48,0x67,0x1d,0x31,0xab,0x5c,0xbe,0xff,0xe7, + 0xa6,0x2f,0x1d,0x90,0xc0,0x60,0xd2,0x4f,0x3a,0xa0,0xdf,0xca,0x7d,0x88,0x9f, // D:/QT/Projects/RRJClient/resource/SSJ_backgroundDark.png 0x0,0x22,0x2a,0x2f, 0x89, @@ -328140,7 +328148,7 @@ static const unsigned char qt_resource_struct[] = { 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, // :/style.css 0x0,0x0,0x0,0x16,0x0,0x1,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x0, -0x0,0x0,0x1,0x94,0x8,0x4d,0x2c,0x6b, +0x0,0x0,0x1,0x94,0x6e,0x89,0xce,0xcb, // :/resource 0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x6,0x0,0x0,0x0,0x3, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, @@ -328151,52 +328159,52 @@ static const unsigned char qt_resource_struct[] = { 0x0,0x0,0x0,0xd6,0x0,0x2,0x0,0x0,0x0,0x9,0x0,0x0,0x0,0x9, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, // :/resource/SSJ-100Dark.png - 0x0,0x0,0x0,0xb2,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x3c,0x49,0x61, + 0x0,0x0,0x0,0xb2,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x3c,0x49,0xe4, 0x0,0x0,0x1,0x92,0x4d,0x8e,0xd2,0xb0, // :/resource/SSJ-100.png - 0x0,0x0,0x0,0x96,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x2f,0xcc,0xb3, + 0x0,0x0,0x0,0x96,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x2f,0xcd,0x36, 0x0,0x0,0x1,0x92,0x4d,0x0,0xce,0xbb, // :/resource/SSJ_backgroundDarkSM.png - 0x0,0x0,0x0,0x60,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x22,0x2d,0x14, + 0x0,0x0,0x0,0x60,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x22,0x2d,0x97, 0x0,0x0,0x1,0x93,0xf7,0x6c,0xa6,0xcf, // :/resource/SSJ_backgroundDark.png - 0x0,0x0,0x0,0x2e,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x2,0xe1, + 0x0,0x0,0x0,0x2e,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x3,0x64, 0x0,0x0,0x1,0x93,0xf7,0x67,0xfd,0xc6, // :/resource/Icons/caution.png - 0x0,0x0,0x1,0x90,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x4f,0x4,0xee, + 0x0,0x0,0x1,0x90,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x4f,0x5,0x71, 0x0,0x0,0x1,0x93,0xf8,0xc4,0xe,0x70, // :/resource/Icons/setting.png - 0x0,0x0,0x2,0x34,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x4f,0xa5,0xf1, + 0x0,0x0,0x2,0x34,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x4f,0xa6,0x74, 0x0,0x0,0x1,0x92,0x47,0x9,0xdd,0xaa, // :/resource/Icons/checked.png - 0x0,0x0,0x2,0x90,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x50,0x3,0x5e, + 0x0,0x0,0x2,0x90,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x50,0x3,0xe1, 0x0,0x0,0x1,0x92,0x51,0xaa,0xfa,0x67, // :/resource/Icons/settingWhite.png - 0x0,0x0,0x1,0xe2,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x4f,0x59,0xea, + 0x0,0x0,0x1,0xe2,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x4f,0x5a,0x6d, 0x0,0x0,0x1,0x92,0x47,0xc,0xaf,0x4c, // :/resource/Icons/plane.png - 0x0,0x0,0x2,0x50,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x4f,0xd1,0x3, + 0x0,0x0,0x2,0x50,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x4f,0xd1,0x86, 0x0,0x0,0x1,0x91,0xb3,0xf,0xc0,0x1f, // :/resource/Icons/crossInCircle.png - 0x0,0x0,0x2,0x68,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x4f,0xd5,0x50, + 0x0,0x0,0x2,0x68,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x4f,0xd5,0xd3, 0x0,0x0,0x1,0x92,0x4c,0x9f,0x4d,0xc4, // :/resource/Icons/whiteCross.png - 0x0,0x0,0x1,0xc0,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x4f,0x43,0x75, + 0x0,0x0,0x1,0xc0,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x4f,0x43,0xf8, 0x0,0x0,0x1,0x92,0x4c,0x9e,0xfa,0x44, // :/resource/Icons/monitor-display.png - 0x0,0x0,0x2,0x8,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x4f,0xa0,0x22, + 0x0,0x0,0x2,0x8,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x4f,0xa0,0xa5, 0x0,0x0,0x1,0x92,0x42,0xfe,0x89,0x26, // :/resource/Icons/762.gif - 0x0,0x0,0x1,0xac,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x4f,0x1c,0xff, + 0x0,0x0,0x1,0xac,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x4f,0x1d,0x82, 0x0,0x0,0x1,0x92,0x4d,0xb,0xea,0x71, // :/resource/Fonts/HelveticaNeue-Medium.ttf - 0x0,0x0,0x0,0xf6,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x46,0xbb,0xbe, + 0x0,0x0,0x0,0xf6,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x46,0xbc,0x41, 0x0,0x0,0x1,0x92,0x42,0xb4,0xbd,0xcd, // :/resource/Fonts/LiberationSans-Regular.ttf - 0x0,0x0,0x1,0x56,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x49,0xac,0xf2, + 0x0,0x0,0x1,0x56,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x49,0xad,0x75, 0x0,0x0,0x1,0x92,0x42,0x25,0xa7,0xdc, // :/resource/Fonts/Kanit Cyrillic.ttf - 0x0,0x0,0x1,0x2c,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x49,0x25,0x32, + 0x0,0x0,0x1,0x2c,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x49,0x25,0xb5, 0x0,0x0,0x1,0x92,0x42,0x14,0x94,0xcc, }; diff --git a/debug/qrc_resources.o b/debug/qrc_resources.o index 5d8fc06..e880a9b 100644 Binary files a/debug/qrc_resources.o and b/debug/qrc_resources.o differ diff --git a/debug/recognizesystem.o b/debug/recognizesystem.o index 5646eed..402b879 100644 Binary files a/debug/recognizesystem.o and b/debug/recognizesystem.o differ diff --git a/debug/sendsystem.o b/debug/sendsystem.o index 0ec9e2c..3b143d3 100644 Binary files a/debug/sendsystem.o and b/debug/sendsystem.o differ diff --git a/debug/tcpclient.o b/debug/tcpclient.o index c583089..cf0ffce 100644 Binary files a/debug/tcpclient.o and b/debug/tcpclient.o differ diff --git a/debug/tools.o b/debug/tools.o index d10d3d6..ff9f0d1 100644 Binary files a/debug/tools.o and b/debug/tools.o differ diff --git a/debug/updatecontroller.o b/debug/updatecontroller.o index 6f29817..6533f0e 100644 Binary files a/debug/updatecontroller.o and b/debug/updatecontroller.o differ diff --git a/debug/versioncontainer.o b/debug/versioncontainer.o index 59733a3..faef12c 100644 Binary files a/debug/versioncontainer.o and b/debug/versioncontainer.o differ diff --git a/debug/versionselectwidget.o b/debug/versionselectwidget.o index 08d1a95..4ace619 100644 Binary files a/debug/versionselectwidget.o and b/debug/versionselectwidget.o differ diff --git a/mainwindow.cpp b/mainwindow.cpp index 6e54393..c7262a6 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -20,8 +20,9 @@ MainWindow::MainWindow(QWidget *parent) void MainWindow::createObjects() { - updateWidget = new UpdateNotifyWidget; + qRegisterMetaType("PacketType"); + updateWidget = new UpdateNotifyWidget; updateWidget->setParent(this); commonButtonGroupWidget = new CommonButtonGroupWidget; @@ -98,12 +99,9 @@ void MainWindow::initialize() screenChecker->check(); emit sigSetConnect(dataParser->getServerSettings(),workerThread); - checkAppAvailable(); //post - - } @@ -112,15 +110,16 @@ void MainWindow::bindConnection() { connect(timer,&QTimer::timeout,this,&MainWindow::slotDisableNotify); - connect(this,&MainWindow::sigUpdateFilesOnServer,updateController,&UpdateController::updateFilesOnServer); + connect(this,&MainWindow::sigUpdateFilesOnServer,updateController,&UpdateController::updateFilesOnServer,Qt::AutoConnection); connect(this,&MainWindow::sigInitializeClient,client,&TCPClient::initialize,Qt::AutoConnection); connect(this,&MainWindow::sigSetConnect,client,&TCPClient::setConnect,Qt::AutoConnection); - connect(this,&MainWindow::sigSendCommand,client,&TCPClient::slotSendCommand,Qt::AutoConnection); + connect(this,&MainWindow::sigSendCommand,sendSystem,&SendSystem::sendPacketType,Qt::AutoConnection); + connect(this,&MainWindow::sigSendCheck,sendSystem,&SendSystem::sendCheckHash,Qt::AutoConnection); connect(this,&MainWindow::sigSendXMLAnswer,sendSystem,&SendSystem::xmlAnswer,Qt::AutoConnection); + connect(this,&MainWindow::sigSendAutorization,sendSystem,&SendSystem::sendClientAutorization); connect(this,&MainWindow::sigGetConnected,client,&TCPClient::getIsConnected); connect(this,&MainWindow::sigCalculateHash,updateController,&UpdateController::calculateCommonHash); - connect(this,&MainWindow::sigSendAutorization,sendSystem,&SendSystem::sendClientAutorization); } void MainWindow::updateProgress() @@ -192,7 +191,6 @@ void MainWindow::showServerListWidget(QList *serverData) entryWidget->hide(); activateLoadingAnimation(false); versionSelectWidget->fillView(serverData); - checkUpdate(); } void MainWindow::lostConnection() @@ -282,10 +280,13 @@ void MainWindow::autoStart() void MainWindow::setTitle() { ServerSettings *currentSettings = dataParser->getServerSettings(); + StreamingVersionData *versionData = new StreamingVersionData; + versionData->setName(currentSettings->LocalVersionName); QString title = tr("Тренажер процедур технического обслуживания самолета RRJ-95NEW-100"); title.append(" (" + currentSettings->LocalVersionName + ")"); ui->headerLabel->setText(title); + versionContainer->setLocalVersionData(versionData); } void MainWindow::loadStaticData() @@ -433,7 +434,7 @@ void MainWindow::loadToServer() void MainWindow::undoCurrentChanges() { isRecovery = true; - emit sigSendCommand("check"); + emit sigSendCheck(); commonButtonGroupWidget->showProgressBar(true); ui->offlineStartButton->setEnabled(false); @@ -449,7 +450,7 @@ void MainWindow::undoCurrentChanges() activateLoadingAnimation(true); - emit sigSendCommand("update"); + emit sigSendCommand(PacketType::TYPE_UPDATE); commonButtonGroupWidget->startUpdateState(); isRecovery = false; @@ -486,7 +487,7 @@ void MainWindow::on_exitButton_clicked() void MainWindow::checkUpdate() { - emit sigSendCommand("check"); + emit sigSendCheck(); ui->inlineTextDebug->setText(tr("Проверка обновлений...")); } diff --git a/mainwindow.h b/mainwindow.h index 374a377..ca4e684 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -73,12 +73,13 @@ signals: HashComparer* hashComparer, TCPClient *tcpClient); - void sigSendCommand(QString command); + void sigSendCommand(PacketType packetType); void sigSendXMLAnswer(QString answer); void sigUpdateFilesOnServer(QList *fileSendList); void sigSetConnect(ServerSettings* serverSettings,QThread *thread); void sigCalculateHash(); void sigSendAutorization(); + void sigSendCheck(); bool sigGetConnected(); diff --git a/style.css b/style.css index 6cdcdc7..f6fd7e4 100644 --- a/style.css +++ b/style.css @@ -17,11 +17,6 @@ QListWidget#updateListWidget color:white; } -QFrame#NewVerBackground -{ - background-color:rgba(0,0,0,90%); -} - QLabel#MovieLabel { background-color:rgba(0,0,0,50%); @@ -55,18 +50,20 @@ QPushButton:disabled QMessageBox { - background-color: white; + background-color: rgb(240,240,240); } QMessageBox QLabel { - font-family: "Calibri"; - font: 20px; + font: 18px; color: black; } QMessageBox QPushButton { + background-color: rgb(225,225,225); + color: black; + border: 1px solid gray; border-radius: 2px; padding: 0.2em 0.2em 0.3em 0.2em; min-width: 70px; @@ -202,4 +199,46 @@ QPushButton#linkButton color:blue; } +/* окно новой версии*/ +QFrame#NewVerBackground +{ + background-color:rgb(240,240,240); +} +QLabel#prevVerTitle +{ + color:black; + font:18px; +} + +QLabel#prevVerValue +{ + color:black; + font:18px; +} + +QLabel#newNameVersionTitle +{ + color:black; + font:18px; +} + +QPushButton#cancelButton +{ + background-color: rgb(225,225,225); + color: black; + border: 1px solid gray; + border-radius: 2px; + padding: 0.2em 0.2em 0.3em 0.2em; + min-width: 70px; +} + +QPushButton#createButton +{ + background-color: rgb(225,225,225); + color: black; + border: 1px solid gray; + border-radius: 2px; + padding: 0.2em 0.2em 0.3em 0.2em; + min-width: 70px; +} diff --git a/ui_newversionwidget.h b/ui_newversionwidget.h index 788080b..c3aded3 100644 --- a/ui_newversionwidget.h +++ b/ui_newversionwidget.h @@ -17,6 +17,7 @@ #include #include #include +#include #include QT_BEGIN_NAMESPACE @@ -24,16 +25,15 @@ QT_BEGIN_NAMESPACE class Ui_NewVersionWidget { public: + QVBoxLayout *verticalLayout_2; QFrame *NewVerBackground; - QWidget *horizontalLayoutWidget; + QVBoxLayout *verticalLayout; QHBoxLayout *baseVerLayout; QLabel *prevVerTitle; QLabel *prevVerValue; - QWidget *horizontalLayoutWidget_2; QHBoxLayout *newNameLayout; QLabel *newNameVersionTitle; QLineEdit *lineEdit; - QWidget *horizontalLayoutWidget_3; QHBoxLayout *horizontalLayout; QSpacerItem *horizontalSpacer; QPushButton *createButton; @@ -45,7 +45,7 @@ public: { if (NewVersionWidget->objectName().isEmpty()) NewVersionWidget->setObjectName(QString::fromUtf8("NewVersionWidget")); - NewVersionWidget->resize(310, 152); + NewVersionWidget->resize(325, 200); QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -53,51 +53,48 @@ public: NewVersionWidget->setSizePolicy(sizePolicy); NewVersionWidget->setAutoFillBackground(true); NewVersionWidget->setStyleSheet(QString::fromUtf8("")); + verticalLayout_2 = new QVBoxLayout(NewVersionWidget); + verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2")); NewVerBackground = new QFrame(NewVersionWidget); NewVerBackground->setObjectName(QString::fromUtf8("NewVerBackground")); NewVerBackground->setEnabled(true); - NewVerBackground->setGeometry(QRect(0, 0, 311, 191)); - QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Expanding); - sizePolicy1.setHorizontalStretch(0); - sizePolicy1.setVerticalStretch(0); - sizePolicy1.setHeightForWidth(NewVerBackground->sizePolicy().hasHeightForWidth()); - NewVerBackground->setSizePolicy(sizePolicy1); + sizePolicy.setHeightForWidth(NewVerBackground->sizePolicy().hasHeightForWidth()); + NewVerBackground->setSizePolicy(sizePolicy); NewVerBackground->setFrameShape(QFrame::StyledPanel); NewVerBackground->setFrameShadow(QFrame::Raised); - horizontalLayoutWidget = new QWidget(NewVerBackground); - horizontalLayoutWidget->setObjectName(QString::fromUtf8("horizontalLayoutWidget")); - horizontalLayoutWidget->setGeometry(QRect(0, 0, 311, 51)); - baseVerLayout = new QHBoxLayout(horizontalLayoutWidget); + verticalLayout = new QVBoxLayout(NewVerBackground); + verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + baseVerLayout = new QHBoxLayout(); baseVerLayout->setObjectName(QString::fromUtf8("baseVerLayout")); baseVerLayout->setContentsMargins(5, 5, 5, 5); - prevVerTitle = new QLabel(horizontalLayoutWidget); + prevVerTitle = new QLabel(NewVerBackground); prevVerTitle->setObjectName(QString::fromUtf8("prevVerTitle")); - QSizePolicy sizePolicy2(QSizePolicy::Minimum, QSizePolicy::Minimum); - sizePolicy2.setHorizontalStretch(0); - sizePolicy2.setVerticalStretch(0); - sizePolicy2.setHeightForWidth(prevVerTitle->sizePolicy().hasHeightForWidth()); - prevVerTitle->setSizePolicy(sizePolicy2); + QSizePolicy sizePolicy1(QSizePolicy::Minimum, QSizePolicy::Minimum); + sizePolicy1.setHorizontalStretch(0); + sizePolicy1.setVerticalStretch(0); + sizePolicy1.setHeightForWidth(prevVerTitle->sizePolicy().hasHeightForWidth()); + prevVerTitle->setSizePolicy(sizePolicy1); baseVerLayout->addWidget(prevVerTitle); - prevVerValue = new QLabel(horizontalLayoutWidget); + prevVerValue = new QLabel(NewVerBackground); prevVerValue->setObjectName(QString::fromUtf8("prevVerValue")); baseVerLayout->addWidget(prevVerValue); - horizontalLayoutWidget_2 = new QWidget(NewVerBackground); - horizontalLayoutWidget_2->setObjectName(QString::fromUtf8("horizontalLayoutWidget_2")); - horizontalLayoutWidget_2->setGeometry(QRect(0, 50, 311, 51)); - newNameLayout = new QHBoxLayout(horizontalLayoutWidget_2); + + verticalLayout->addLayout(baseVerLayout); + + newNameLayout = new QHBoxLayout(); newNameLayout->setSpacing(6); newNameLayout->setObjectName(QString::fromUtf8("newNameLayout")); newNameLayout->setContentsMargins(5, 5, 20, 5); - newNameVersionTitle = new QLabel(horizontalLayoutWidget_2); + newNameVersionTitle = new QLabel(NewVerBackground); newNameVersionTitle->setObjectName(QString::fromUtf8("newNameVersionTitle")); newNameLayout->addWidget(newNameVersionTitle); - lineEdit = new QLineEdit(horizontalLayoutWidget_2); + lineEdit = new QLineEdit(NewVerBackground); lineEdit->setObjectName(QString::fromUtf8("lineEdit")); sizePolicy.setHeightForWidth(lineEdit->sizePolicy().hasHeightForWidth()); lineEdit->setSizePolicy(sizePolicy); @@ -106,17 +103,17 @@ public: newNameLayout->addWidget(lineEdit); - horizontalLayoutWidget_3 = new QWidget(NewVerBackground); - horizontalLayoutWidget_3->setObjectName(QString::fromUtf8("horizontalLayoutWidget_3")); - horizontalLayoutWidget_3->setGeometry(QRect(0, 100, 311, 51)); - horizontalLayout = new QHBoxLayout(horizontalLayoutWidget_3); + + verticalLayout->addLayout(newNameLayout); + + horizontalLayout = new QHBoxLayout(); horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); - horizontalLayout->setContentsMargins(0, 0, 0, 6); + horizontalLayout->setContentsMargins(-1, -1, -1, 6); horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Minimum, QSizePolicy::Minimum); horizontalLayout->addItem(horizontalSpacer); - createButton = new QPushButton(horizontalLayoutWidget_3); + createButton = new QPushButton(NewVerBackground); createButton->setObjectName(QString::fromUtf8("createButton")); sizePolicy.setHeightForWidth(createButton->sizePolicy().hasHeightForWidth()); createButton->setSizePolicy(sizePolicy); @@ -127,7 +124,7 @@ public: horizontalLayout->addItem(horizontalSpacer_3); - cancelButton = new QPushButton(horizontalLayoutWidget_3); + cancelButton = new QPushButton(NewVerBackground); cancelButton->setObjectName(QString::fromUtf8("cancelButton")); sizePolicy.setHeightForWidth(cancelButton->sizePolicy().hasHeightForWidth()); cancelButton->setSizePolicy(sizePolicy); @@ -139,6 +136,12 @@ public: horizontalLayout->addItem(horizontalSpacer_2); + verticalLayout->addLayout(horizontalLayout); + + + verticalLayout_2->addWidget(NewVerBackground); + + retranslateUi(NewVersionWidget); QMetaObject::connectSlotsByName(NewVersionWidget);