waitAnimationWidget при ожидании подтв-я блок-ки

This commit is contained in:
2026-01-23 12:17:41 +03:00
parent fe15f059e4
commit 19222cd855
8 changed files with 40 additions and 2 deletions

View File

@@ -68,7 +68,9 @@ InstructorsAndTraineesWidget::InstructorsAndTraineesWidget(QWidget *parent) :
connect(connectorToServer, &ConnectorToServer::signal_ConnectedToServer, this, &InstructorsAndTraineesWidget::slot_ConnectedToServer);
connect(viewerTrainees, &ViewerTrainees::signal_traineeSelected, this, &InstructorsAndTraineesWidget::slot_traineeSelected);
connect(viewerTrainees, &ViewerTrainees::signal_needShowWait, this, &InstructorsAndTraineesWidget::slot_needShowWait);
connect(viewerInstructors, &ViewerInstructors::signal_instructorSelected, this, &InstructorsAndTraineesWidget::slot_instructorSelected);
connect(viewerInstructors, &ViewerInstructors::signal_needShowWait, this, &InstructorsAndTraineesWidget::slot_needShowWait);
connect(messangerController, &MessangerController::signal_receiveMessage_fromInstructor, viewerInstructors, &ViewerInstructors::slot_receiveMessage);
connect(messangerController, &MessangerController::signal_receiveMessage_fromTrainee, viewerTrainees, &ViewerTrainees::slot_receiveMessage);
@@ -425,7 +427,8 @@ void InstructorsAndTraineesWidget::slot_ConnectedToServer(bool state)
if(!flTryConnectToServer)
{
WidgetTools::closeAllChildWidgets(this, "SpecMsgBox");
SpecMsgBox::WarningClose(this, tr("The server is not available!"));
waitAnimationWidget->hideWithStop();
SpecMsgBox::WarningClose(this, tr("The server is not available!"));
}
}
else
@@ -487,6 +490,14 @@ void InstructorsAndTraineesWidget::slot_ServerBlockState(bool state)
updateLabelServer();
}
void InstructorsAndTraineesWidget::slot_needShowWait(bool flNeed)
{
if(flNeed)
waitAnimationWidget->showWithPlay();
else
waitAnimationWidget->hideWithStop();
}
bool InstructorsAndTraineesWidget::authorizationInstructorDialog(QWidget* parent)
{
dlgAuthorization = new DialogAuthorization(parent);
@@ -695,6 +706,7 @@ void InstructorsAndTraineesWidget::on_btnSettings_clicked()
connect(dlgSettings, &DialogSettings::signal_LanguageChanged, this, &InstructorsAndTraineesWidget::slot_LanguageChanged);
connect(dlgSettings, &DialogSettings::signal_UpdateStyleSheet, this, &InstructorsAndTraineesWidget::slot_UpdateStyleSheet);
//connect(dlgSettings, &DialogSettings::signal_needShowWait, this, &InstructorsAndTraineesWidget::slot_needShowWait);
switch( dlgSettings->exec() )
{