mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJClient.git
synced 2026-03-28 05:25:39 +03:00
ref: change send command
This commit is contained in:
@@ -20,8 +20,9 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
|
||||
void MainWindow::createObjects()
|
||||
{
|
||||
updateWidget = new UpdateNotifyWidget;
|
||||
qRegisterMetaType<PacketType>("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<StreamingVersionData *> *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("Проверка обновлений..."));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user