notifyController убрал

This commit is contained in:
2025-11-30 19:28:08 +03:00
parent fb493aca9f
commit d129fbded0
20 changed files with 82 additions and 206 deletions

View File

@@ -22,7 +22,6 @@ AMMtasksWidget::AMMtasksWidget(ConnectorToServer* connectorToServer, TypeListTre
waitAnimationWidget(nullptr),
dlgCheckerTask(nullptr),
dlgListSubProc(nullptr),
specialMessageBox(nullptr),
flOnlyActive(false),
lastCurrentID(0)
{
@@ -157,8 +156,6 @@ void AMMtasksWidget::closeChildDlg()
dlgCheckerTask->close();
if(dlgListSubProc)
dlgListSubProc->close();
if(specialMessageBox)
specialMessageBox->close();
}
void AMMtasksWidget::changeEvent(QEvent *event)
@@ -329,16 +326,10 @@ void AMMtasksWidget::slot_UpdateSubProcForDMCode(QString dmCode)
lastSelectedTask.listSubProc.clear();
dlgListSubProc->getListCheckedSubProc(&lastSelectedTask.listSubProc);
specialMessageBox = new SpecMsgBox(this, SpecMsgBox::TypeSpecMsgBox::warningYesNo, tr("Assign this task?"));
if(specialMessageBox->exec() == QDialog::Accepted)
if(SpecMsgBox::WarningYesNo(this, tr("Assign this task?")) == QDialog::Accepted)
{
connectorToServer->sendQueryToDB(TypeQueryToDB::TYPE_QUERY_ASSIGN_TASK_AMM_TO_TRAINEE, idTraineeSelected, &lastSelectedTask);
}
if(specialMessageBox)
{
delete specialMessageBox;
specialMessageBox = nullptr;
}
break;
}
case QDialog::Rejected:
@@ -357,16 +348,10 @@ void AMMtasksWidget::slot_UpdateSubProcForDMCode(QString dmCode)
{
lastSelectedTask.listSubProc.clear();
specialMessageBox = new SpecMsgBox(this, SpecMsgBox::TypeSpecMsgBox::warningYesNo, tr("Assign this task?"));
if(specialMessageBox->exec() == QDialog::Accepted)
if(SpecMsgBox::WarningYesNo(this, tr("Assign this task?")) == QDialog::Accepted)
{
connectorToServer->sendQueryToDB(TypeQueryToDB::TYPE_QUERY_ASSIGN_TASK_AMM_TO_TRAINEE, idTraineeSelected, &lastSelectedTask);
}
if(specialMessageBox)
{
delete specialMessageBox;
specialMessageBox = nullptr;
}
}
}
}
@@ -520,18 +505,11 @@ void AMMtasksWidget::on_btnDelete_clicked()
int id = treeItemCurrent->text(ColumnsTreeAMM::clmnAMM_ID).toInt();
specialMessageBox = new SpecMsgBox(this, SpecMsgBox::TypeSpecMsgBox::warningYesNo, tr("The deletion will be irrevocable.\nDelete it anyway?"));
if(specialMessageBox->exec() == QDialog::Accepted)
if(SpecMsgBox::WarningYesNo(this, tr("The deletion will be irrevocable.\nDelete it anyway?")) == QDialog::Accepted)
{
waitAnimationWidget->showWithPlay();
connectorToServer->sendQueryToDB(TypeQueryToDB::TYPE_QUERY_DEL_TASK_AMM_TO_TRAINEE, id);
}
if(specialMessageBox)
{
delete specialMessageBox;
specialMessageBox = nullptr;
}
}
}
}