mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-27 19:45:43 +03:00
refact0
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user