mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-27 19:45:43 +03:00
Сделал очищение списков Обучаемых и инструкторов при деавторизации
This commit is contained in:
@@ -39,6 +39,10 @@ public:
|
||||
{
|
||||
this->authComplited = authComplited;
|
||||
}
|
||||
void clearTree()
|
||||
{
|
||||
treeWidget->clear();
|
||||
}
|
||||
|
||||
protected:
|
||||
void setArchiveVisible(bool archiveVisible)
|
||||
|
||||
@@ -38,8 +38,8 @@ InstructorsAndTraineesWidget::InstructorsAndTraineesWidget(QWidget *parent) :
|
||||
connect(viewerInstructors, &ViewerInstructors::signal_BlockAutorization, this, &InstructorsAndTraineesWidget::signal_BlockAutorization);
|
||||
connect(viewerTrainees, &ViewerTrainees::signal_BlockAutorization, this, &InstructorsAndTraineesWidget::signal_BlockAutorization);
|
||||
|
||||
connect(connectorToServer,&ConnectorToServer::signal_UpdateDB,viewerInstructors,&ViewerInstructors::slot_NeedUpdateUI);
|
||||
connect(connectorToServer,&ConnectorToServer::signal_UpdateDB,viewerTrainees,&ViewerTrainees::slot_NeedUpdateUI);
|
||||
//connect(connectorToServer,&ConnectorToServer::signal_UpdateDB,viewerInstructors,&ViewerInstructors::slot_NeedUpdateUI);
|
||||
//connect(connectorToServer,&ConnectorToServer::signal_UpdateDB,viewerTrainees,&ViewerTrainees::slot_NeedUpdateUI);
|
||||
|
||||
connect(connectorToServer,&ConnectorToServer::signal_ConnectedToServer,this,&InstructorsAndTraineesWidget::slot_ConnectedToServer);
|
||||
|
||||
@@ -194,7 +194,7 @@ void InstructorsAndTraineesWidget::checkDeLoginResult(ServerDeAuthorization *ser
|
||||
viewerInstructors->setAuthComplited(false);
|
||||
viewerTrainees->setAuthComplited(false);
|
||||
|
||||
Q_EMIT signal_NeedUpdateUI(true, false);
|
||||
//Q_EMIT signal_NeedUpdateUI(true, false);
|
||||
|
||||
ui->btnAuthorizationInstructor->setText(tr("Authorization Instructor"));
|
||||
updateLabelLoggedInInstructor("","");
|
||||
@@ -225,6 +225,9 @@ void InstructorsAndTraineesWidget::slot_ConnectedToServer(bool state)
|
||||
ui->btnAuthorizationInstructor->setChecked(false);
|
||||
ui->btnSetVersion->hide();
|
||||
ui->lblDBisConnected->setPixmap(QPixmap(QStringLiteral(":/resources/icons/circleGray.png")));
|
||||
|
||||
viewerTrainees->clearTree();
|
||||
viewerInstructors->clearTree();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -284,6 +287,8 @@ void InstructorsAndTraineesWidget::on_btnAuthorizationInstructor_clicked()
|
||||
{//Авторизация Инструктора локальная (Администратора)
|
||||
if(authorizationInstructorDialog(this))
|
||||
{
|
||||
connect(connectorToServer,&ConnectorToServer::signal_UpdateDB,viewerInstructors,&ViewerInstructors::slot_NeedUpdateUI);
|
||||
connect(connectorToServer,&ConnectorToServer::signal_UpdateDB,viewerTrainees,&ViewerTrainees::slot_NeedUpdateUI);
|
||||
}
|
||||
else
|
||||
ui->btnAuthorizationInstructor->setChecked(false);
|
||||
@@ -294,6 +299,11 @@ void InstructorsAndTraineesWidget::on_btnAuthorizationInstructor_clicked()
|
||||
{
|
||||
if(deAuthorizationInstructor(loginInstructorLoggedInLocal))
|
||||
{
|
||||
disconnect(connectorToServer,&ConnectorToServer::signal_UpdateDB,viewerInstructors,&ViewerInstructors::slot_NeedUpdateUI);
|
||||
disconnect(connectorToServer,&ConnectorToServer::signal_UpdateDB,viewerTrainees,&ViewerTrainees::slot_NeedUpdateUI);
|
||||
|
||||
viewerTrainees->clearTree();
|
||||
viewerInstructors->clearTree();
|
||||
}
|
||||
else
|
||||
ui->btnAuthorizationInstructor->setChecked(true);
|
||||
|
||||
Reference in New Issue
Block a user