mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
SpecialMessageBox
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include "ammtaskswidget.h"
|
||||
#include "ui_ammtaskswidget.h"
|
||||
#include "dialogchecktask.h"
|
||||
#include "specialmessagebox.h"
|
||||
|
||||
AMMtasksWidget::AMMtasksWidget(ConnectorToServer* connectorToServer, TypeListTreeAMMFIM type, QWidget *parent) :
|
||||
QWidget(parent),
|
||||
@@ -291,7 +292,7 @@ void AMMtasksWidget::on_btnDelete_clicked()
|
||||
|
||||
int id = treeItemCurrent->text(ColumnsTreeAMM::clmnAMM_ID).toInt();
|
||||
|
||||
if(QMessageBox::warning(this, tr("Attention!"), tr("The deletion will be irrevocable.\nDelete it anyway?"), QMessageBox::Ok, QMessageBox::Cancel) == QMessageBox::Ok)
|
||||
if(SpecialMessageBox(this, SpecialMessageBox::TypeSpecMsgBox::warning, tr("The deletion will be irrevocable.\nDelete it anyway?")).exec() == QDialog::Accepted)
|
||||
{
|
||||
waitAnimationWidget->showWithPlay();
|
||||
connectorToServer->sendQueryToDB(TypeQueryToDB::TYPE_QUERY_DEL_TASK_AMM_TO_TRAINEE, id);
|
||||
@@ -334,7 +335,7 @@ void AMMtasksWidget::on_btnCheck_clicked()
|
||||
|
||||
void AMMtasksWidget::on_btnAssignTask_clicked()
|
||||
{
|
||||
if(QMessageBox::question(this, tr("New task"), tr("Assign this task?"), QMessageBox::Ok, QMessageBox::Cancel) == QMessageBox::Ok)
|
||||
if(SpecialMessageBox(this, SpecialMessageBox::TypeSpecMsgBox::warning, tr("Assign this task?")).exec() == QDialog::Accepted)
|
||||
assignTaskAMMtoTrainee();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "dialogchecktask.h"
|
||||
#include "specialmessagebox.h"
|
||||
#include "ui_dialogchecktask.h"
|
||||
|
||||
DialogCheckTask::DialogCheckTask(ConnectorToServer* connectorToServer, QString type, QWidget *parent) :
|
||||
@@ -138,7 +139,7 @@ void DialogCheckTask::on_btnWrong_clicked()
|
||||
msgString = tr("Change task status?\nThe status will be set:\n'new'");
|
||||
}
|
||||
|
||||
if(QMessageBox::warning(this, tr("Attention!"), msgString, QMessageBox::Ok, QMessageBox::Cancel) == QMessageBox::Ok)
|
||||
if(SpecialMessageBox(this, SpecialMessageBox::TypeSpecMsgBox::warning, msgString).exec() == QDialog::Accepted)
|
||||
{
|
||||
connectorToServer->sendQueryToDB(typeQuery, id_task, (void*)&status);
|
||||
this->parentWidget()->close();
|
||||
@@ -165,7 +166,7 @@ void DialogCheckTask::on_btnRight_clicked()
|
||||
msgString = tr("Change task status?\nThe status will be set:\n'completed'");
|
||||
}
|
||||
|
||||
if(QMessageBox::warning(this, tr("Attention!"), msgString, QMessageBox::Ok, QMessageBox::Cancel) == QMessageBox::Ok)
|
||||
if(SpecialMessageBox(this, SpecialMessageBox::TypeSpecMsgBox::warning, msgString).exec() == QDialog::Accepted)
|
||||
{
|
||||
connectorToServer->sendQueryToDB(typeQuery, id_task, (void*)&status);
|
||||
this->parentWidget()->close();
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "ui_fimtaskswidget.h"
|
||||
#include "tasksAmmFim.h"
|
||||
#include "dialogchecktask.h"
|
||||
#include "specialmessagebox.h"
|
||||
|
||||
FIMtasksWidget::FIMtasksWidget(ConnectorToServer* connectorToServer, TypeListTreeAMMFIM type, QWidget *parent) :
|
||||
QWidget(parent),
|
||||
@@ -338,7 +339,7 @@ void FIMtasksWidget::on_btnDelete_clicked()
|
||||
|
||||
int id = treeItemCurrent->text(ColumnsTreeFIM::clmnFIM_ID).toInt();
|
||||
|
||||
if(QMessageBox::warning(this, tr("Attention!"), tr("The deletion will be irrevocable.\nDelete it anyway?"), QMessageBox::Ok, QMessageBox::Cancel) == QMessageBox::Ok)
|
||||
if(SpecialMessageBox(this, SpecialMessageBox::TypeSpecMsgBox::warning, tr("The deletion will be irrevocable.\nDelete it anyway?")).exec() == QDialog::Accepted)
|
||||
{
|
||||
waitAnimationWidget->showWithPlay();
|
||||
connectorToServer->sendQueryToDB(TypeQueryToDB::TYPE_QUERY_DEL_TASK_FIM_TO_TRAINEE, id);
|
||||
@@ -385,7 +386,7 @@ void FIMtasksWidget::on_btnCheck_clicked()
|
||||
|
||||
void FIMtasksWidget::on_btnAssignTask_clicked()
|
||||
{
|
||||
if(QMessageBox::question(this, tr("New task"), tr("Assign this task?"), QMessageBox::Ok, QMessageBox::Cancel) == QMessageBox::Ok)
|
||||
if(SpecialMessageBox(this, SpecialMessageBox::TypeSpecMsgBox::warning, tr("Assign this task?")).exec() == QDialog::Accepted)
|
||||
assignTaskFIMtoTrainee();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user