This commit is contained in:
2025-09-17 17:42:34 +03:00
parent bd1bcd4e71
commit 8cf98ea2d9
17 changed files with 85 additions and 1307 deletions

View File

@@ -23,6 +23,7 @@ InstructorsAndTraineesWidget::InstructorsAndTraineesWidget(QWidget *parent) :
nameInstructorLoggedInLocal(QStringLiteral("")),
idInstructorLoggedInLocal("0"),
language(languageENG),
flSettingsServerIsChanged(false),
ui(new Ui::InstructorsAndTraineesWidget)
{
ui->setupUi(this);
@@ -62,15 +63,15 @@ InstructorsAndTraineesWidget::InstructorsAndTraineesWidget(QWidget *parent) :
ui->verticalLayout_Trainees->addWidget(viewerTrainees);
ui->verticalLayout_Instructors->addWidget(viewerInstructors);
ui->groupBox_Messenger->setMinimumHeight(900);
ui->groupBox_Messenger->setMinimumHeight(600);
ui->groupBox_Messenger->setMaximumWidth(500);
ui->groupBox_Messenger->setMinimumWidth(500);
ui->groupBox_Instructors->setMinimumHeight(300);
ui->groupBox_Instructors->setMinimumHeight(200);
ui->groupBox_Instructors->setMaximumHeight(300);
ui->groupBox_Trainees->setMinimumHeight(600);
ui->groupBox_Trainees->setMinimumHeight(400);
ui->groupBox_Trainees->setMinimumWidth(600);
ui->groupBox_Instructors->setMinimumWidth(600);
@@ -182,6 +183,9 @@ void InstructorsAndTraineesWidget::slot_checkLoginResult(ServerAuthorization *se
connectorToServer->sendQueryTasksXML("fim");
connectorToServer->sendQueryTasksXML("amm");
viewerTrainees->activate();
viewerInstructors->activate();
}
else
{
@@ -251,7 +255,10 @@ void InstructorsAndTraineesWidget::slot_ConnectedToServer(bool state)
updateLabelLoggedInInstructor(loginInstructorLoggedInLocal, nameInstructorLoggedInLocal);
updateLabelServer();
SpecialMessageBox(this, SpecialMessageBox::TypeSpecMsgBox::warningClose, tr("The server is not available!")).exec();
if(!flSettingsServerIsChanged)
SpecialMessageBox(this, SpecialMessageBox::TypeSpecMsgBox::warningClose, tr("The server is not available!")).exec();
else
flSettingsServerIsChanged = false;
}
}
@@ -441,6 +448,8 @@ void InstructorsAndTraineesWidget::on_btnSettings_clicked()
{
SpecialMessageBox(this, SpecialMessageBox::TypeSpecMsgBox::warningClose, tr("Server settings have been changed. Please reconnect to the server.")).exec();
flSettingsServerIsChanged = true;
if(authorizationIsCompleted())
deAuthorizationInstructor(loginInstructorLoggedInLocal);