Wait крутилки на все действия с редакторами

This commit is contained in:
2025-07-01 17:53:35 +03:00
parent d48db016cb
commit 67cc236b70
6 changed files with 59 additions and 8 deletions

View File

@@ -21,6 +21,8 @@ EditorInstructors::EditorInstructors(ConnectorToServer* connectorToServer, bool
if(adminMode)
ui->btnArchive->click();
waitAnimationWidget->setParent(this);
}
EditorInstructors::~EditorInstructors()
@@ -34,7 +36,10 @@ void EditorInstructors::on_btnNewInstructor_clicked()
Instructor instructor_edit;
if(editInstructor(instructor, &instructor_edit))
{
waitAnimationWidget->showWithPlay();
connectorToServer->sendQueryToDB(TypeQueryToDB::TYPE_QUERY_NEW_INSTRUCTOR, 0, &instructor_edit);
}
return;
/*
@@ -111,6 +116,7 @@ void EditorInstructors::on_btnDeleteInstructor_clicked()
if(QMessageBox::warning(this, tr("Attention!"), tr("The deletion will be irrevocable.\nDelete it anyway?"), QMessageBox::Ok, QMessageBox::Cancel) == QMessageBox::Ok)
{
waitAnimationWidget->showWithPlay();
connectorToServer->sendQueryToDB(TypeQueryToDB::TYPE_QUERY_DEL_INSTRUCTOR, id);
}
}
@@ -136,6 +142,7 @@ void EditorInstructors::on_btnToOrFromArchive_clicked()
if(connectorToServer->isArchivedInstructor(id))
{//Архивный
instructor.setArchived(false);
waitAnimationWidget->showWithPlay();
connectorToServer->sendQueryToDB(TypeQueryToDB::TYPE_QUERY_EDIT_INSTRUCTOR, id, &instructor);
}
else
@@ -147,6 +154,7 @@ void EditorInstructors::on_btnToOrFromArchive_clicked()
}
instructor.setArchived(true);
waitAnimationWidget->showWithPlay();
connectorToServer->sendQueryToDB(TypeQueryToDB::TYPE_QUERY_EDIT_INSTRUCTOR, id, &instructor);
if(!archiveVisible)
ui->btnArchive->click();
@@ -189,7 +197,10 @@ void EditorInstructors::on_btnEdit_clicked()
Instructor instructor_edit;
if(editInstructor(instructor, &instructor_edit))
{
waitAnimationWidget->showWithPlay();
connectorToServer->sendQueryToDB(TypeQueryToDB::TYPE_QUERY_EDIT_INSTRUCTOR, id, &instructor_edit);
}
}
}