diff --git a/InstructorsAndTrainees/CMakeLists.txt b/InstructorsAndTrainees/CMakeLists.txt
index 35b8155..cf5c377 100644
--- a/InstructorsAndTrainees/CMakeLists.txt
+++ b/InstructorsAndTrainees/CMakeLists.txt
@@ -121,6 +121,13 @@ add_library(InstructorsAndTrainees SHARED
tasks/viewertaskscommon.h
tasks/viewertaskscommon.ui
+ tasks/dialoglistsubproc.cpp
+ tasks/dialoglistsubproc.h
+
+ tasks/listsubproc.cpp
+ tasks/listsubproc.h
+ tasks/listsubproc.ui
+
widgets/newversionwidget.cpp
widgets/newversionwidget.h
widgets/newversionwidget.ui
diff --git a/InstructorsAndTrainees/tasks/ammtaskswidget.cpp b/InstructorsAndTrainees/tasks/ammtaskswidget.cpp
index eb585e8..69f422b 100644
--- a/InstructorsAndTrainees/tasks/ammtaskswidget.cpp
+++ b/InstructorsAndTrainees/tasks/ammtaskswidget.cpp
@@ -21,6 +21,7 @@ AMMtasksWidget::AMMtasksWidget(ConnectorToServer* connectorToServer, TypeListTre
taskTreePreparation(nullptr),
waitAnimationWidget(nullptr),
dlgCheckerTask(nullptr),
+ dlgListSubProc(nullptr),
flOnlyActive(false),
lastCurrentID(0)
{
@@ -33,6 +34,7 @@ AMMtasksWidget::AMMtasksWidget(ConnectorToServer* connectorToServer, TypeListTre
//connect(treeWidget, &QTreeWidget::currentItemChanged, this, &AMMtasksWidget::on_treeWidgetItemClicked);
connect(treeWidget, &QTreeWidget::itemClicked, this, &AMMtasksWidget::on_treeWidgetItemClicked);
+ connect(treeWidget, &QTreeWidget::itemDoubleClicked, this, &AMMtasksWidget::on_treeWidgetDoubleClicked);
preparationTreeWidget();
@@ -149,6 +151,12 @@ void AMMtasksWidget::closeDlgCheckTask()
dlgCheckerTask->close();
}
+void AMMtasksWidget::closeDlgListSubProc()
+{
+ if(dlgListSubProc)
+ dlgListSubProc->close();
+}
+
void AMMtasksWidget::changeEvent(QEvent *event)
{
// В случае получения события изменения языка приложения
@@ -442,6 +450,41 @@ void AMMtasksWidget::on_btnOnlyActive_clicked()
loadTasksAMM(false);
}
+void AMMtasksWidget::on_treeWidgetDoubleClicked(QTreeWidgetItem *item, int column)
+{
+ if(item == nullptr)
+ return;
+
+ int id = item->text(ColumnsTreeAMM::clmnAMM_ID).toInt();
+
+ TaskAmmFim task = taskTreePreparation->getTaskAMMbyID(id);
+
+ if(taskTreePreparation->getTypeModuleAMMbyID(id) == ModuleType::TYPE_PM)
+ {
+
+ }
+ else
+ {//Отображаем перечень подпроцедур
+ TaskAmmFim task = taskTreePreparation->getTaskAMMbyID(id);
+
+ if(!task.getID())
+ return;
+
+ dlgListSubProc = new DialogListSubProc(connectorToServer, this);
+ //dlgListSubProc->setTask(&task);
+ dlgListSubProc->exec();
+
+ //if(dlgListSubProc->getFlChanged())
+ //waitAnimationWidget->showWithPlay();
+
+ if(dlgListSubProc)
+ {
+ delete dlgListSubProc;
+ dlgListSubProc = nullptr;
+ }
+ }
+}
+
void AMMtasksWidget::on_btnDocsUpdating_clicked()
{
connectorToServer->sendQueryTasksXML("amm");
diff --git a/InstructorsAndTrainees/tasks/ammtaskswidget.h b/InstructorsAndTrainees/tasks/ammtaskswidget.h
index 99f7751..970dec4 100644
--- a/InstructorsAndTrainees/tasks/ammtaskswidget.h
+++ b/InstructorsAndTrainees/tasks/ammtaskswidget.h
@@ -8,6 +8,7 @@
#include "connectortoserver.h"
#include "tasktreepreparation.h"
#include "dialogchekertask.h"
+#include "dialoglistsubproc.h"
namespace Ui {
class AMMtasksWidget;
@@ -30,6 +31,7 @@ public:
public:
void resizeEvent(QResizeEvent *event) override;
void closeDlgCheckTask();
+ void closeDlgListSubProc();
protected:
void changeEvent(QEvent * event) override;
@@ -40,6 +42,8 @@ private Q_SLOTS:
void on_btnAssignTask_clicked();
void on_btnOnlyActive_clicked(); //AMM
+ void on_treeWidgetDoubleClicked(QTreeWidgetItem *item, int column);
+
void on_btnDocsUpdating_clicked();
@@ -91,6 +95,8 @@ private:
DialogChekerTask* dlgCheckerTask;
+ DialogListSubProc* dlgListSubProc;
+
bool flOnlyActive; //AMM
int lastCurrentID;
diff --git a/InstructorsAndTrainees/tasks/checkertask.ui b/InstructorsAndTrainees/tasks/checkertask.ui
index 691a5f2..5d3ce90 100644
--- a/InstructorsAndTrainees/tasks/checkertask.ui
+++ b/InstructorsAndTrainees/tasks/checkertask.ui
@@ -51,7 +51,7 @@
- :/resources/icons/rectGray.png
+ :/resources/icons/rectGray.png
@@ -171,7 +171,7 @@
Failed
-
+
:/resources/icons/circleRed.png:/resources/icons/circleRed.png
@@ -197,7 +197,7 @@
Right
-
+
:/resources/icons/circleGreen.png:/resources/icons/circleGreen.png
@@ -231,7 +231,7 @@
-
+
diff --git a/InstructorsAndTrainees/tasks/dialoglistsubproc.cpp b/InstructorsAndTrainees/tasks/dialoglistsubproc.cpp
new file mode 100644
index 0000000..1f2dbee
--- /dev/null
+++ b/InstructorsAndTrainees/tasks/dialoglistsubproc.cpp
@@ -0,0 +1,35 @@
+#include
+#include "dialoglistsubproc.h"
+
+DialogListSubProc::DialogListSubProc(ConnectorToServer* connectorToServer, QWidget *parent) :
+ QDialog(parent,
+ Qt::WindowSystemMenuHint
+ | Qt::WindowMaximizeButtonHint
+ | Qt::WindowMinimizeButtonHint
+ | Qt::WindowCloseButtonHint),
+ listSubProc(nullptr)
+{
+ listSubProc = new ListSubProc(connectorToServer, this);
+
+ QHBoxLayout *layout = new QHBoxLayout(this);
+ layout->addWidget(listSubProc);
+ this->setWindowTitle(tr("List subprocedures"));
+
+ this->setMinimumSize(400, 200);
+ this->setModal(true);
+}
+
+DialogListSubProc::~DialogListSubProc()
+{
+ delete listSubProc;
+}
+
+void DialogListSubProc::closeEvent(QCloseEvent *event)
+{
+ listSubProc->close();
+}
+
+void DialogListSubProc::setTask(TaskAmmFim *task)
+{
+ //listSubProc->setTask(task);
+}
diff --git a/InstructorsAndTrainees/tasks/dialoglistsubproc.h b/InstructorsAndTrainees/tasks/dialoglistsubproc.h
new file mode 100644
index 0000000..eab583c
--- /dev/null
+++ b/InstructorsAndTrainees/tasks/dialoglistsubproc.h
@@ -0,0 +1,26 @@
+#ifndef DIALOGLISTSUBPROC_H
+#define DIALOGLISTSUBPROC_H
+
+#include
+#include
+
+#include "connectortoserver.h"
+#include "listsubproc.h"
+
+class DialogListSubProc : public QDialog
+{
+ Q_OBJECT
+public:
+ DialogListSubProc(ConnectorToServer* connectorToServer, QWidget *parent = nullptr);
+ ~DialogListSubProc();
+
+ void closeEvent(QCloseEvent *event) override;
+
+public:
+ void setTask(TaskAmmFim* task);
+
+private:
+ ListSubProc* listSubProc;
+};
+
+#endif // DIALOGLISTSUBPROC_H
diff --git a/InstructorsAndTrainees/tasks/listsubproc.cpp b/InstructorsAndTrainees/tasks/listsubproc.cpp
new file mode 100644
index 0000000..7615e5a
--- /dev/null
+++ b/InstructorsAndTrainees/tasks/listsubproc.cpp
@@ -0,0 +1,14 @@
+#include "listsubproc.h"
+#include "ui_listsubproc.h"
+
+ListSubProc::ListSubProc(ConnectorToServer* connectorToServer, QWidget *parent) :
+ QWidget(parent),
+ ui(new Ui::ListSubProc)
+{
+ ui->setupUi(this);
+}
+
+ListSubProc::~ListSubProc()
+{
+ delete ui;
+}
diff --git a/InstructorsAndTrainees/tasks/listsubproc.h b/InstructorsAndTrainees/tasks/listsubproc.h
new file mode 100644
index 0000000..9315538
--- /dev/null
+++ b/InstructorsAndTrainees/tasks/listsubproc.h
@@ -0,0 +1,23 @@
+#ifndef LISTSUBPROC_H
+#define LISTSUBPROC_H
+
+#include
+#include "connectorToServer.h"
+
+namespace Ui {
+class ListSubProc;
+}
+
+class ListSubProc : public QWidget
+{
+ Q_OBJECT
+
+public:
+ explicit ListSubProc(ConnectorToServer* connectorToServer, QWidget *parent = nullptr);
+ ~ListSubProc();
+
+private:
+ Ui::ListSubProc *ui;
+};
+
+#endif // LISTSUBPROC_H
diff --git a/InstructorsAndTrainees/tasks/listsubproc.ui b/InstructorsAndTrainees/tasks/listsubproc.ui
new file mode 100644
index 0000000..3f8a4f1
--- /dev/null
+++ b/InstructorsAndTrainees/tasks/listsubproc.ui
@@ -0,0 +1,57 @@
+
+
+ ListSubProc
+
+
+
+ 0
+ 0
+ 400
+ 300
+
+
+
+ Form
+
+
+ -
+
+
-
+
+
-
+
+
+ Title
+
+
+
+ -
+
+
+ DM code
+
+
+
+
+
+ -
+
+
-
+
+
+ Subprocedures
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+