mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
Wait крутилки на все действия с задачами
This commit is contained in:
@@ -101,6 +101,11 @@ void AMMtasksWidget::deactivate()
|
||||
idTraineeSelected = 0;
|
||||
}
|
||||
|
||||
void AMMtasksWidget::waitAnimationWidgetShowWithPlay()
|
||||
{
|
||||
waitAnimationWidget->showWithPlay();
|
||||
}
|
||||
|
||||
void AMMtasksWidget::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
QSize size = event->size();
|
||||
@@ -301,6 +306,7 @@ void AMMtasksWidget::assignTaskAMMtoTrainee()
|
||||
taskNew.ammProcedure.title = techName;
|
||||
taskNew.ammProcedure.dmCode = dmCode;
|
||||
|
||||
emit signal_AssignedTask();
|
||||
connectorToServer->sendQueryToDB(TypeQueryToDB::TYPE_QUERY_ASSIGN_TASK_AMM_TO_TRAINEE, trainee_id, &taskNew);
|
||||
}
|
||||
}
|
||||
@@ -320,6 +326,7 @@ void AMMtasksWidget::on_btnDelete_clicked()
|
||||
|
||||
if(QMessageBox::warning(this, tr("Attention!"), tr("The deletion will be irrevocable.\nDelete it anyway?"), QMessageBox::Ok, QMessageBox::Cancel) == QMessageBox::Ok)
|
||||
{
|
||||
waitAnimationWidget->showWithPlay();
|
||||
connectorToServer->sendQueryToDB(TypeQueryToDB::TYPE_QUERY_DEL_TASK_AMM_TO_TRAINEE, id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ public:
|
||||
|
||||
public:
|
||||
void deactivate();
|
||||
void waitAnimationWidgetShowWithPlay();
|
||||
|
||||
public:
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
@@ -53,6 +54,9 @@ private:
|
||||
Q_SIGNALS:
|
||||
void signal_prepareAMMListItems(QByteArray array, bool flOnlyActive);
|
||||
void signal_prepareAMMListItemsForTrainee(QList<TaskAmmFim> listTask);
|
||||
|
||||
void signal_AssignedTask();
|
||||
|
||||
public Q_SLOTS:
|
||||
void slot_AMMlistItemsReady(QList<QTreeWidgetItem*> listItems);
|
||||
|
||||
|
||||
@@ -5,7 +5,8 @@ DialogCheckTask::DialogCheckTask(ConnectorToServer* connectorToServer, QWidget *
|
||||
QWidget(parent),
|
||||
ui(new Ui::DialogCheckTask),
|
||||
connectorToServer(connectorToServer),
|
||||
fimTasksWidget(nullptr)
|
||||
fimTasksWidget(nullptr),
|
||||
flChanged(false)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
@@ -91,6 +92,7 @@ void DialogCheckTask::on_btnWrong_clicked()
|
||||
connectorToServer->sendQueryToDB(TypeQueryToDB::TYPE_QUERY_CHANGE_STATUS_REPORT_TASK_FIM_TO_TRAINEE, id, (void*)&status);
|
||||
//this->close();
|
||||
this->parentWidget()->close();
|
||||
flChanged = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,5 +106,6 @@ void DialogCheckTask::on_btnRight_clicked()
|
||||
connectorToServer->sendQueryToDB(TypeQueryToDB::TYPE_QUERY_CHANGE_STATUS_REPORT_TASK_FIM_TO_TRAINEE, id, (void*)&status);
|
||||
//this->close();
|
||||
this->parentWidget()->close();
|
||||
flChanged = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ public:
|
||||
public:
|
||||
void setTask(TaskAmmFim* task);
|
||||
TaskAmmFim getTask();
|
||||
bool getFlChanged(){return flChanged;}
|
||||
|
||||
private slots:
|
||||
void on_btnWrong_clicked();
|
||||
@@ -36,6 +37,8 @@ private:
|
||||
private:
|
||||
ConnectorToServer* connectorToServer;
|
||||
FIMtasksWidget* fimTasksWidget;
|
||||
|
||||
bool flChanged;
|
||||
};
|
||||
|
||||
#endif // DIALOGCHECKTASK_H
|
||||
|
||||
@@ -228,6 +228,11 @@ void FIMtasksWidget::slot_UpdateTasksFIMforTrainee(int trainee_id)
|
||||
}
|
||||
}
|
||||
|
||||
void FIMtasksWidget::waitAnimationWidgetShowWithPlay()
|
||||
{
|
||||
waitAnimationWidget->showWithPlay();
|
||||
}
|
||||
|
||||
void FIMtasksWidget::loadTasksFIM()
|
||||
{
|
||||
//Обновление дерева
|
||||
@@ -314,6 +319,7 @@ void FIMtasksWidget::assignTaskFIMtoTrainee()
|
||||
}
|
||||
}
|
||||
|
||||
emit signal_AssignedTask();
|
||||
connectorToServer->sendQueryToDB(TypeQueryToDB::TYPE_QUERY_ASSIGN_TASK_FIM_TO_TRAINEE, trainee_id, &taskNew);
|
||||
|
||||
updateTaskItem(current);
|
||||
@@ -334,6 +340,7 @@ void FIMtasksWidget::on_btnDelete_clicked()
|
||||
|
||||
if(QMessageBox::warning(this, tr("Attention!"), tr("The deletion will be irrevocable.\nDelete it anyway?"), QMessageBox::Ok, QMessageBox::Cancel) == QMessageBox::Ok)
|
||||
{
|
||||
waitAnimationWidget->showWithPlay();
|
||||
connectorToServer->sendQueryToDB(TypeQueryToDB::TYPE_QUERY_DEL_TASK_FIM_TO_TRAINEE, id);
|
||||
}
|
||||
}
|
||||
@@ -365,6 +372,9 @@ void FIMtasksWidget::on_btnCheck_clicked()
|
||||
dialog->setMinimumSize(1600, 800);
|
||||
dialog->setStyleSheet(this->styleSheet());
|
||||
dialog->exec();
|
||||
|
||||
if(dlg.getFlChanged())
|
||||
waitAnimationWidget->showWithPlay();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ public:
|
||||
public:
|
||||
void deactivate();
|
||||
void setOneTaskFim(TaskAmmFim* task); //FIM
|
||||
void waitAnimationWidgetShowWithPlay();
|
||||
|
||||
public:
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
@@ -43,7 +44,7 @@ public Q_SLOTS:
|
||||
//слот обработки сигнала о выборе обучаемого
|
||||
void slot_traineeSelected(QString login);
|
||||
|
||||
void slot_UpdateTasksFIMforTrainee(int trainee_id);
|
||||
void slot_UpdateTasksFIMforTrainee(int trainee_id);
|
||||
|
||||
private:
|
||||
void preparationTreeWidget();
|
||||
@@ -55,6 +56,9 @@ private:
|
||||
Q_SIGNALS:
|
||||
void signal_prepareFIMListItems(QByteArray array);
|
||||
void signal_prepareFIMListItemsForTrainee(QList<TaskAmmFim> listTask);
|
||||
|
||||
void signal_AssignedTask();
|
||||
|
||||
public Q_SLOTS:
|
||||
void slot_FIMlistItemsReady(QList<QTreeWidgetItem*> listItems);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user