mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-27 19:45:43 +03:00
Wait крутилки на все действия с задачами
This commit is contained in:
@@ -65,6 +65,9 @@ DialogSettings::DialogSettings(ConnectorToServer* connectorToServer, bool instru
|
||||
ui->btnSetVersion->setEnabled(true);
|
||||
}
|
||||
|
||||
ui->label_AutoStart->setVisible(false);
|
||||
ui->checkAutoStart->setVisible(false);
|
||||
|
||||
if(settings->Language == "ENG")
|
||||
qtLanguageTranslator.load(QString("translations/InstructorsAndTraineesWidget_") + "en_EN", ".");
|
||||
else
|
||||
|
||||
@@ -162,6 +162,9 @@
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_AutoStart">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_AutoStart">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Auto start</string>
|
||||
</property>
|
||||
@@ -182,6 +185,9 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkAutoStart">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
@@ -231,6 +237,12 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_Additional">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Additional</string>
|
||||
</property>
|
||||
|
||||
@@ -23,7 +23,7 @@ void InstructorsView::resizeEvent(QResizeEvent *event)
|
||||
|
||||
if(typeView == TypeView::onlyView)
|
||||
{//onlyView
|
||||
widthInstructor = width - (200 + 10);
|
||||
widthInstructor = width - (300 + 10);
|
||||
}
|
||||
else
|
||||
{//control
|
||||
|
||||
@@ -78,6 +78,9 @@ InstructorsAndTraineesWidget::InstructorsAndTraineesWidget(QWidget *parent) :
|
||||
connect(messangerWidget, &MessangerWidget::signal_msgToClientReady, connectorToServer, &ConnectorToServer::slot_msgToClientReady);
|
||||
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);
|
||||
@@ -133,15 +136,15 @@ InstructorsAndTraineesWidget::InstructorsAndTraineesWidget(QWidget *parent) :
|
||||
ui->groupBox_Messenger->setMaximumWidth(500);
|
||||
ui->groupBox_Instructors->setMaximumWidth(500);
|
||||
|
||||
ui->groupBox_Messenger->setMinimumWidth(500);
|
||||
ui->groupBox_Instructors->setMinimumWidth(500);
|
||||
ui->groupBox_Messenger->setMinimumWidth(490);
|
||||
ui->groupBox_Instructors->setMinimumWidth(490);
|
||||
|
||||
ui->groupBox_Messenger->setMinimumHeight(600);
|
||||
ui->groupBox_Instructors->setMinimumHeight(400);
|
||||
ui->groupBox_Instructors->setMaximumHeight(400);
|
||||
ui->groupBox_Messenger->setMinimumHeight(500);
|
||||
ui->groupBox_Instructors->setMinimumHeight(300);
|
||||
ui->groupBox_Instructors->setMaximumHeight(300);
|
||||
|
||||
ui->groupBox_Trainees->setMinimumWidth(700);
|
||||
ui->groupBox_Tasks->setMinimumWidth(700);
|
||||
ui->groupBox_Tasks->setMinimumWidth(600);
|
||||
|
||||
|
||||
ui->btnAuthorizationInstructor->setEnabled(false);
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>70</height>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
@@ -92,7 +92,7 @@
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>65</width>
|
||||
<height>58</height>
|
||||
<height>44</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
// В случае получения события изменения языка приложения
|
||||
|
||||
@@ -41,6 +41,9 @@ public Q_SLOTS:
|
||||
//слот обработки сигнала об изменении вкладки диалога в мессенджере
|
||||
void slot_tabMessengerChanged(QString login);
|
||||
|
||||
void slot_waitAnimationWidgetShowWithPlayFIM();
|
||||
void slot_waitAnimationWidgetShowWithPlayAMM();
|
||||
|
||||
Q_SIGNALS:
|
||||
//сигнал о выборе обучаемого
|
||||
void signal_traineeSelected(QString login);
|
||||
|
||||
Reference in New Issue
Block a user