mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
Переработан порядок передачи списков 0
This commit is contained in:
@@ -29,6 +29,8 @@ InstructorsAndTraineesWidget::InstructorsAndTraineesWidget(QWidget *parent) :
|
||||
flTryConnectToServer(false),
|
||||
cntTryConnectToServer(0),
|
||||
flTryLogin(false),
|
||||
flTryReceiveFIM(false),
|
||||
flTryReceiveAMM(false),
|
||||
language(languageENG),
|
||||
versionStr("..."),
|
||||
ui(new Ui::InstructorsAndTraineesWidget)
|
||||
@@ -58,6 +60,10 @@ InstructorsAndTraineesWidget::InstructorsAndTraineesWidget(QWidget *parent) :
|
||||
connect(connectorToServer, &ConnectorToServer::signal_AnswerDocsChanged,this, &InstructorsAndTraineesWidget::slot_AnswerDocsChanged);
|
||||
connect(connectorToServer, &ConnectorToServer::signal_ServerBlockState, this, &InstructorsAndTraineesWidget::slot_ServerBlockState);
|
||||
|
||||
|
||||
connect(connectorToServer, &ConnectorToServer::signal_UpdateTasksFIM, this, &InstructorsAndTraineesWidget::slot_UpdateTasksFIM);
|
||||
connect(connectorToServer, &ConnectorToServer::signal_UpdateTasksAMM, this, &InstructorsAndTraineesWidget::slot_UpdateTasksAMM);
|
||||
|
||||
messangerController = new MessangerController(connectorToServer, this);
|
||||
|
||||
viewerTrainees = new ViewerTrainees(connectorToServer, messangerController, this);
|
||||
@@ -244,13 +250,15 @@ void InstructorsAndTraineesWidget::slot_checkLoginResult(ServerAuthorization *se
|
||||
|
||||
messangerController->setUserLocalGUI_ID(serverAuth->Id.toInt());
|
||||
|
||||
/*
|
||||
connectorToServer->sendQueryTasksXML("fim");
|
||||
connectorToServer->sendQueryTasksXML("amm");
|
||||
*/
|
||||
|
||||
viewerTrainees->activate();
|
||||
viewerInstructors->activate();
|
||||
|
||||
waitAnimationWidget->hideWithStop();
|
||||
//waitAnimationWidget->hideWithStop();
|
||||
|
||||
flTryLogin = false;
|
||||
}
|
||||
@@ -258,6 +266,8 @@ void InstructorsAndTraineesWidget::slot_checkLoginResult(ServerAuthorization *se
|
||||
{
|
||||
//waitAnimationWidget->hideWithStop();
|
||||
//ui->btnAuthorizationInstructor->setChecked(false);
|
||||
flTryReceiveFIM = false;
|
||||
flTryReceiveAMM = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -300,6 +310,8 @@ void InstructorsAndTraineesWidget::slot_ServerBlocked()
|
||||
if(flTryLogin)
|
||||
{
|
||||
flTryLogin = false;
|
||||
flTryReceiveFIM = false;
|
||||
flTryReceiveAMM = false;
|
||||
waitAnimationWidget->hideWithStop();
|
||||
|
||||
ui->btnAuthorizationInstructor->setChecked(false);
|
||||
@@ -312,6 +324,8 @@ void InstructorsAndTraineesWidget::slot_ErrorAuth(QString error)
|
||||
if(flTryLogin)
|
||||
{
|
||||
flTryLogin = false;
|
||||
flTryReceiveFIM = false;
|
||||
flTryReceiveAMM = false;
|
||||
waitAnimationWidget->hideWithStop();
|
||||
|
||||
ui->btnAuthorizationInstructor->setChecked(false);
|
||||
@@ -441,6 +455,8 @@ void InstructorsAndTraineesWidget::slot_ConnectedToServer(bool state)
|
||||
updateLabelServer();
|
||||
|
||||
flTryLogin = false;
|
||||
flTryReceiveFIM = false;
|
||||
flTryReceiveAMM = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -501,6 +517,26 @@ void InstructorsAndTraineesWidget::slot_needShowWait(bool flNeed)
|
||||
waitAnimationWidget->hideWithStop();
|
||||
}
|
||||
|
||||
void InstructorsAndTraineesWidget::slot_UpdateTasksAMM()
|
||||
{
|
||||
if(flTryReceiveAMM)
|
||||
{
|
||||
flTryReceiveAMM = false;
|
||||
if(!flTryReceiveAMM && !flTryReceiveFIM)
|
||||
waitAnimationWidget->hideWithStop();
|
||||
}
|
||||
}
|
||||
|
||||
void InstructorsAndTraineesWidget::slot_UpdateTasksFIM()
|
||||
{
|
||||
if(flTryReceiveFIM)
|
||||
{
|
||||
flTryReceiveFIM = false;
|
||||
if(!flTryReceiveAMM && !flTryReceiveFIM)
|
||||
waitAnimationWidget->hideWithStop();
|
||||
}
|
||||
}
|
||||
|
||||
bool InstructorsAndTraineesWidget::authorizationInstructorDialog(QWidget* parent)
|
||||
{
|
||||
dlgAuthorization = new DialogAuthorization(parent);
|
||||
@@ -528,6 +564,8 @@ bool InstructorsAndTraineesWidget::authorizationInstructorDialog(QWidget* parent
|
||||
waitAnimationWidget->showWithPlay();
|
||||
|
||||
flTryLogin = true;
|
||||
flTryReceiveFIM = true;
|
||||
flTryReceiveAMM = true;
|
||||
|
||||
connectorToServer->sendAuthorizationInstructorLocal(login, password);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user