feat: change UI for send to server

This commit is contained in:
semenov
2024-10-01 16:25:54 +03:00
parent dfe08fc2db
commit 11e71f46a7
34 changed files with 5562 additions and 917 deletions

View File

@@ -16,7 +16,7 @@ void UpdateNotifyWidget::initialize(MainWindow *mainWindow,UpdateController *upd
{
setWindowTitle(tr("Отправка новых файлов"));
ui->LoadingBar->hide();
//ui->LoadingBar->hide();
this->mainWindow = mainWindow;
this->updateController = updateController;
currentLoadingCount = 0;
@@ -31,13 +31,13 @@ void UpdateNotifyWidget::setUpdateList(QList<FileData> *fileDataList)
int listCount = fileDataList->count();
this->updateList = fileDataList;
ui->LoadingBar->setRange(0,listCount);
//ui->LoadingBar->setRange(0,listCount);
}
void UpdateNotifyWidget::updateCount()
{
currentLoadingCount++;
ui->LoadingBar->setValue(currentLoadingCount);
//ui->LoadingBar->setValue(currentLoadingCount);
}
void UpdateNotifyWidget::addToList(FileData fileData)
@@ -51,15 +51,15 @@ void UpdateNotifyWidget::addToList(FileData fileData)
void UpdateNotifyWidget::on_StartLoadButton_clicked()
{
emit sigUpdateFilesOnServer(updateList);
ui->StartLoadButton->setEnabled(false);
ui->CancelButton->setEnabled(false);
ui->LoadingBar->show();
//ui->StartLoadButton->setEnabled(false);
//ui->CancelButton->setEnabled(false);
//ui->LoadingBar->show();
}
void UpdateNotifyWidget::on_CancelButton_clicked()
{
mainWindow->checkUpdate();
close();
}
void UpdateNotifyWidget::fillList()
@@ -95,3 +95,8 @@ void UpdateNotifyWidget::showCompleteDialogBox(bool flag)
connect(messageBox,&QMessageBox::accepted,this,&UpdateNotifyWidget::on_CancelButton_clicked);
messageBox->show();
}
void UpdateNotifyWidget::on_closeButton_clicked()
{
close();
}