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:
@@ -65,6 +65,9 @@ DialogSettings::DialogSettings(ConnectorToServer* connectorToServer, bool instru
|
|||||||
ui->btnSetVersion->setEnabled(true);
|
ui->btnSetVersion->setEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ui->label_AutoStart->setVisible(false);
|
||||||
|
ui->checkAutoStart->setVisible(false);
|
||||||
|
|
||||||
if(settings->Language == "ENG")
|
if(settings->Language == "ENG")
|
||||||
qtLanguageTranslator.load(QString("translations/InstructorsAndTraineesWidget_") + "en_EN", ".");
|
qtLanguageTranslator.load(QString("translations/InstructorsAndTraineesWidget_") + "en_EN", ".");
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -162,6 +162,9 @@
|
|||||||
<layout class="QHBoxLayout" name="horizontalLayout_AutoStart">
|
<layout class="QHBoxLayout" name="horizontalLayout_AutoStart">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_AutoStart">
|
<widget class="QLabel" name="label_AutoStart">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Auto start</string>
|
<string>Auto start</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -182,6 +185,9 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="checkAutoStart">
|
<widget class="QCheckBox" name="checkAutoStart">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
@@ -231,6 +237,12 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox_Additional">
|
<widget class="QGroupBox" name="groupBox_Additional">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>150</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Additional</string>
|
<string>Additional</string>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ void InstructorsView::resizeEvent(QResizeEvent *event)
|
|||||||
|
|
||||||
if(typeView == TypeView::onlyView)
|
if(typeView == TypeView::onlyView)
|
||||||
{//onlyView
|
{//onlyView
|
||||||
widthInstructor = width - (200 + 10);
|
widthInstructor = width - (300 + 10);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{//control
|
{//control
|
||||||
|
|||||||
@@ -78,6 +78,9 @@ InstructorsAndTraineesWidget::InstructorsAndTraineesWidget(QWidget *parent) :
|
|||||||
connect(messangerWidget, &MessangerWidget::signal_msgToClientReady, connectorToServer, &ConnectorToServer::slot_msgToClientReady);
|
connect(messangerWidget, &MessangerWidget::signal_msgToClientReady, connectorToServer, &ConnectorToServer::slot_msgToClientReady);
|
||||||
connect(connectorToServer,&ConnectorToServer::signal_msgFromClientReady,messangerWidget,&MessangerWidget::slot_msgFromClientReady);
|
connect(connectorToServer,&ConnectorToServer::signal_msgFromClientReady,messangerWidget,&MessangerWidget::slot_msgFromClientReady);
|
||||||
|
|
||||||
|
connect(fimTasksWidget, &FIMtasksWidget::signal_AssignedTask, viewerTrainees, &ViewerTrainees::slot_waitAnimationWidgetShowWithPlayFIM);
|
||||||
|
connect(ammTasksWidget, &AMMtasksWidget::signal_AssignedTask, viewerTrainees, &ViewerTrainees::slot_waitAnimationWidgetShowWithPlayAMM);
|
||||||
|
|
||||||
|
|
||||||
//Размещение
|
//Размещение
|
||||||
ui->verticalLayout_Trainees->addWidget(viewerTrainees);
|
ui->verticalLayout_Trainees->addWidget(viewerTrainees);
|
||||||
@@ -133,15 +136,15 @@ InstructorsAndTraineesWidget::InstructorsAndTraineesWidget(QWidget *parent) :
|
|||||||
ui->groupBox_Messenger->setMaximumWidth(500);
|
ui->groupBox_Messenger->setMaximumWidth(500);
|
||||||
ui->groupBox_Instructors->setMaximumWidth(500);
|
ui->groupBox_Instructors->setMaximumWidth(500);
|
||||||
|
|
||||||
ui->groupBox_Messenger->setMinimumWidth(500);
|
ui->groupBox_Messenger->setMinimumWidth(490);
|
||||||
ui->groupBox_Instructors->setMinimumWidth(500);
|
ui->groupBox_Instructors->setMinimumWidth(490);
|
||||||
|
|
||||||
ui->groupBox_Messenger->setMinimumHeight(600);
|
ui->groupBox_Messenger->setMinimumHeight(500);
|
||||||
ui->groupBox_Instructors->setMinimumHeight(400);
|
ui->groupBox_Instructors->setMinimumHeight(300);
|
||||||
ui->groupBox_Instructors->setMaximumHeight(400);
|
ui->groupBox_Instructors->setMaximumHeight(300);
|
||||||
|
|
||||||
ui->groupBox_Trainees->setMinimumWidth(700);
|
ui->groupBox_Trainees->setMinimumWidth(700);
|
||||||
ui->groupBox_Tasks->setMinimumWidth(700);
|
ui->groupBox_Tasks->setMinimumWidth(600);
|
||||||
|
|
||||||
|
|
||||||
ui->btnAuthorizationInstructor->setEnabled(false);
|
ui->btnAuthorizationInstructor->setEnabled(false);
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>0</width>
|
||||||
<height>70</height>
|
<height>50</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>65</width>
|
<width>65</width>
|
||||||
<height>58</height>
|
<height>44</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
|
|||||||
@@ -101,6 +101,11 @@ void AMMtasksWidget::deactivate()
|
|||||||
idTraineeSelected = 0;
|
idTraineeSelected = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AMMtasksWidget::waitAnimationWidgetShowWithPlay()
|
||||||
|
{
|
||||||
|
waitAnimationWidget->showWithPlay();
|
||||||
|
}
|
||||||
|
|
||||||
void AMMtasksWidget::resizeEvent(QResizeEvent *event)
|
void AMMtasksWidget::resizeEvent(QResizeEvent *event)
|
||||||
{
|
{
|
||||||
QSize size = event->size();
|
QSize size = event->size();
|
||||||
@@ -301,6 +306,7 @@ void AMMtasksWidget::assignTaskAMMtoTrainee()
|
|||||||
taskNew.ammProcedure.title = techName;
|
taskNew.ammProcedure.title = techName;
|
||||||
taskNew.ammProcedure.dmCode = dmCode;
|
taskNew.ammProcedure.dmCode = dmCode;
|
||||||
|
|
||||||
|
emit signal_AssignedTask();
|
||||||
connectorToServer->sendQueryToDB(TypeQueryToDB::TYPE_QUERY_ASSIGN_TASK_AMM_TO_TRAINEE, trainee_id, &taskNew);
|
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)
|
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);
|
connectorToServer->sendQueryToDB(TypeQueryToDB::TYPE_QUERY_DEL_TASK_AMM_TO_TRAINEE, id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ public:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
void deactivate();
|
void deactivate();
|
||||||
|
void waitAnimationWidgetShowWithPlay();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void resizeEvent(QResizeEvent *event) override;
|
void resizeEvent(QResizeEvent *event) override;
|
||||||
@@ -53,6 +54,9 @@ private:
|
|||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void signal_prepareAMMListItems(QByteArray array, bool flOnlyActive);
|
void signal_prepareAMMListItems(QByteArray array, bool flOnlyActive);
|
||||||
void signal_prepareAMMListItemsForTrainee(QList<TaskAmmFim> listTask);
|
void signal_prepareAMMListItemsForTrainee(QList<TaskAmmFim> listTask);
|
||||||
|
|
||||||
|
void signal_AssignedTask();
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void slot_AMMlistItemsReady(QList<QTreeWidgetItem*> listItems);
|
void slot_AMMlistItemsReady(QList<QTreeWidgetItem*> listItems);
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ DialogCheckTask::DialogCheckTask(ConnectorToServer* connectorToServer, QWidget *
|
|||||||
QWidget(parent),
|
QWidget(parent),
|
||||||
ui(new Ui::DialogCheckTask),
|
ui(new Ui::DialogCheckTask),
|
||||||
connectorToServer(connectorToServer),
|
connectorToServer(connectorToServer),
|
||||||
fimTasksWidget(nullptr)
|
fimTasksWidget(nullptr),
|
||||||
|
flChanged(false)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
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);
|
connectorToServer->sendQueryToDB(TypeQueryToDB::TYPE_QUERY_CHANGE_STATUS_REPORT_TASK_FIM_TO_TRAINEE, id, (void*)&status);
|
||||||
//this->close();
|
//this->close();
|
||||||
this->parentWidget()->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);
|
connectorToServer->sendQueryToDB(TypeQueryToDB::TYPE_QUERY_CHANGE_STATUS_REPORT_TASK_FIM_TO_TRAINEE, id, (void*)&status);
|
||||||
//this->close();
|
//this->close();
|
||||||
this->parentWidget()->close();
|
this->parentWidget()->close();
|
||||||
|
flChanged = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ public:
|
|||||||
public:
|
public:
|
||||||
void setTask(TaskAmmFim* task);
|
void setTask(TaskAmmFim* task);
|
||||||
TaskAmmFim getTask();
|
TaskAmmFim getTask();
|
||||||
|
bool getFlChanged(){return flChanged;}
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void on_btnWrong_clicked();
|
void on_btnWrong_clicked();
|
||||||
@@ -36,6 +37,8 @@ private:
|
|||||||
private:
|
private:
|
||||||
ConnectorToServer* connectorToServer;
|
ConnectorToServer* connectorToServer;
|
||||||
FIMtasksWidget* fimTasksWidget;
|
FIMtasksWidget* fimTasksWidget;
|
||||||
|
|
||||||
|
bool flChanged;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DIALOGCHECKTASK_H
|
#endif // DIALOGCHECKTASK_H
|
||||||
|
|||||||
@@ -228,6 +228,11 @@ void FIMtasksWidget::slot_UpdateTasksFIMforTrainee(int trainee_id)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FIMtasksWidget::waitAnimationWidgetShowWithPlay()
|
||||||
|
{
|
||||||
|
waitAnimationWidget->showWithPlay();
|
||||||
|
}
|
||||||
|
|
||||||
void FIMtasksWidget::loadTasksFIM()
|
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);
|
connectorToServer->sendQueryToDB(TypeQueryToDB::TYPE_QUERY_ASSIGN_TASK_FIM_TO_TRAINEE, trainee_id, &taskNew);
|
||||||
|
|
||||||
updateTaskItem(current);
|
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)
|
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);
|
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->setMinimumSize(1600, 800);
|
||||||
dialog->setStyleSheet(this->styleSheet());
|
dialog->setStyleSheet(this->styleSheet());
|
||||||
dialog->exec();
|
dialog->exec();
|
||||||
|
|
||||||
|
if(dlg.getFlChanged())
|
||||||
|
waitAnimationWidget->showWithPlay();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ public:
|
|||||||
public:
|
public:
|
||||||
void deactivate();
|
void deactivate();
|
||||||
void setOneTaskFim(TaskAmmFim* task); //FIM
|
void setOneTaskFim(TaskAmmFim* task); //FIM
|
||||||
|
void waitAnimationWidgetShowWithPlay();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void resizeEvent(QResizeEvent *event) override;
|
void resizeEvent(QResizeEvent *event) override;
|
||||||
@@ -55,6 +56,9 @@ private:
|
|||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void signal_prepareFIMListItems(QByteArray array);
|
void signal_prepareFIMListItems(QByteArray array);
|
||||||
void signal_prepareFIMListItemsForTrainee(QList<TaskAmmFim> listTask);
|
void signal_prepareFIMListItemsForTrainee(QList<TaskAmmFim> listTask);
|
||||||
|
|
||||||
|
void signal_AssignedTask();
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void slot_FIMlistItemsReady(QList<QTreeWidgetItem*> listItems);
|
void slot_FIMlistItemsReady(QList<QTreeWidgetItem*> listItems);
|
||||||
|
|
||||||
|
|||||||
@@ -90,6 +90,16 @@ void ViewerTrainees::slot_tabMessengerChanged(QString login)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ViewerTrainees::slot_waitAnimationWidgetShowWithPlayFIM()
|
||||||
|
{
|
||||||
|
fimTasksWidget->waitAnimationWidgetShowWithPlay();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ViewerTrainees::slot_waitAnimationWidgetShowWithPlayAMM()
|
||||||
|
{
|
||||||
|
ammTasksWidget->waitAnimationWidgetShowWithPlay();
|
||||||
|
}
|
||||||
|
|
||||||
void ViewerTrainees::changeEvent(QEvent *event)
|
void ViewerTrainees::changeEvent(QEvent *event)
|
||||||
{
|
{
|
||||||
// В случае получения события изменения языка приложения
|
// В случае получения события изменения языка приложения
|
||||||
|
|||||||
@@ -41,6 +41,9 @@ public Q_SLOTS:
|
|||||||
//слот обработки сигнала об изменении вкладки диалога в мессенджере
|
//слот обработки сигнала об изменении вкладки диалога в мессенджере
|
||||||
void slot_tabMessengerChanged(QString login);
|
void slot_tabMessengerChanged(QString login);
|
||||||
|
|
||||||
|
void slot_waitAnimationWidgetShowWithPlayFIM();
|
||||||
|
void slot_waitAnimationWidgetShowWithPlayAMM();
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
//сигнал о выборе обучаемого
|
//сигнал о выборе обучаемого
|
||||||
void signal_traineeSelected(QString login);
|
void signal_traineeSelected(QString login);
|
||||||
|
|||||||
Reference in New Issue
Block a user