mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
GUI. Заготовка под список подпроцедур
This commit is contained in:
@@ -121,6 +121,13 @@ add_library(InstructorsAndTrainees SHARED
|
|||||||
tasks/viewertaskscommon.h
|
tasks/viewertaskscommon.h
|
||||||
tasks/viewertaskscommon.ui
|
tasks/viewertaskscommon.ui
|
||||||
|
|
||||||
|
tasks/dialoglistsubproc.cpp
|
||||||
|
tasks/dialoglistsubproc.h
|
||||||
|
|
||||||
|
tasks/listsubproc.cpp
|
||||||
|
tasks/listsubproc.h
|
||||||
|
tasks/listsubproc.ui
|
||||||
|
|
||||||
widgets/newversionwidget.cpp
|
widgets/newversionwidget.cpp
|
||||||
widgets/newversionwidget.h
|
widgets/newversionwidget.h
|
||||||
widgets/newversionwidget.ui
|
widgets/newversionwidget.ui
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ AMMtasksWidget::AMMtasksWidget(ConnectorToServer* connectorToServer, TypeListTre
|
|||||||
taskTreePreparation(nullptr),
|
taskTreePreparation(nullptr),
|
||||||
waitAnimationWidget(nullptr),
|
waitAnimationWidget(nullptr),
|
||||||
dlgCheckerTask(nullptr),
|
dlgCheckerTask(nullptr),
|
||||||
|
dlgListSubProc(nullptr),
|
||||||
flOnlyActive(false),
|
flOnlyActive(false),
|
||||||
lastCurrentID(0)
|
lastCurrentID(0)
|
||||||
{
|
{
|
||||||
@@ -33,6 +34,7 @@ AMMtasksWidget::AMMtasksWidget(ConnectorToServer* connectorToServer, TypeListTre
|
|||||||
|
|
||||||
//connect(treeWidget, &QTreeWidget::currentItemChanged, this, &AMMtasksWidget::on_treeWidgetItemClicked);
|
//connect(treeWidget, &QTreeWidget::currentItemChanged, this, &AMMtasksWidget::on_treeWidgetItemClicked);
|
||||||
connect(treeWidget, &QTreeWidget::itemClicked, this, &AMMtasksWidget::on_treeWidgetItemClicked);
|
connect(treeWidget, &QTreeWidget::itemClicked, this, &AMMtasksWidget::on_treeWidgetItemClicked);
|
||||||
|
connect(treeWidget, &QTreeWidget::itemDoubleClicked, this, &AMMtasksWidget::on_treeWidgetDoubleClicked);
|
||||||
|
|
||||||
preparationTreeWidget();
|
preparationTreeWidget();
|
||||||
|
|
||||||
@@ -149,6 +151,12 @@ void AMMtasksWidget::closeDlgCheckTask()
|
|||||||
dlgCheckerTask->close();
|
dlgCheckerTask->close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AMMtasksWidget::closeDlgListSubProc()
|
||||||
|
{
|
||||||
|
if(dlgListSubProc)
|
||||||
|
dlgListSubProc->close();
|
||||||
|
}
|
||||||
|
|
||||||
void AMMtasksWidget::changeEvent(QEvent *event)
|
void AMMtasksWidget::changeEvent(QEvent *event)
|
||||||
{
|
{
|
||||||
// В случае получения события изменения языка приложения
|
// В случае получения события изменения языка приложения
|
||||||
@@ -442,6 +450,41 @@ void AMMtasksWidget::on_btnOnlyActive_clicked()
|
|||||||
loadTasksAMM(false);
|
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()
|
void AMMtasksWidget::on_btnDocsUpdating_clicked()
|
||||||
{
|
{
|
||||||
connectorToServer->sendQueryTasksXML("amm");
|
connectorToServer->sendQueryTasksXML("amm");
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
#include "connectortoserver.h"
|
#include "connectortoserver.h"
|
||||||
#include "tasktreepreparation.h"
|
#include "tasktreepreparation.h"
|
||||||
#include "dialogchekertask.h"
|
#include "dialogchekertask.h"
|
||||||
|
#include "dialoglistsubproc.h"
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class AMMtasksWidget;
|
class AMMtasksWidget;
|
||||||
@@ -30,6 +31,7 @@ public:
|
|||||||
public:
|
public:
|
||||||
void resizeEvent(QResizeEvent *event) override;
|
void resizeEvent(QResizeEvent *event) override;
|
||||||
void closeDlgCheckTask();
|
void closeDlgCheckTask();
|
||||||
|
void closeDlgListSubProc();
|
||||||
protected:
|
protected:
|
||||||
void changeEvent(QEvent * event) override;
|
void changeEvent(QEvent * event) override;
|
||||||
|
|
||||||
@@ -40,6 +42,8 @@ private Q_SLOTS:
|
|||||||
void on_btnAssignTask_clicked();
|
void on_btnAssignTask_clicked();
|
||||||
void on_btnOnlyActive_clicked(); //AMM
|
void on_btnOnlyActive_clicked(); //AMM
|
||||||
|
|
||||||
|
void on_treeWidgetDoubleClicked(QTreeWidgetItem *item, int column);
|
||||||
|
|
||||||
|
|
||||||
void on_btnDocsUpdating_clicked();
|
void on_btnDocsUpdating_clicked();
|
||||||
|
|
||||||
@@ -91,6 +95,8 @@ private:
|
|||||||
|
|
||||||
DialogChekerTask* dlgCheckerTask;
|
DialogChekerTask* dlgCheckerTask;
|
||||||
|
|
||||||
|
DialogListSubProc* dlgListSubProc;
|
||||||
|
|
||||||
bool flOnlyActive; //AMM
|
bool flOnlyActive; //AMM
|
||||||
|
|
||||||
int lastCurrentID;
|
int lastCurrentID;
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="pixmap">
|
<property name="pixmap">
|
||||||
<pixmap resource="../resources.qrc">:/resources/icons/rectGray.png</pixmap>
|
<pixmap resource="../InstructorsAndTrainees.qrc">:/resources/icons/rectGray.png</pixmap>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -171,7 +171,7 @@
|
|||||||
<string>Failed</string>
|
<string>Failed</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../resources.qrc">
|
<iconset resource="../InstructorsAndTrainees.qrc">
|
||||||
<normaloff>:/resources/icons/circleRed.png</normaloff>:/resources/icons/circleRed.png</iconset>
|
<normaloff>:/resources/icons/circleRed.png</normaloff>:/resources/icons/circleRed.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
@@ -197,7 +197,7 @@
|
|||||||
<string>Right</string>
|
<string>Right</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../resources.qrc">
|
<iconset resource="../InstructorsAndTrainees.qrc">
|
||||||
<normaloff>:/resources/icons/circleGreen.png</normaloff>:/resources/icons/circleGreen.png</iconset>
|
<normaloff>:/resources/icons/circleGreen.png</normaloff>:/resources/icons/circleGreen.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
@@ -231,7 +231,7 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../resources.qrc"/>
|
<include location="../InstructorsAndTrainees.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|||||||
35
InstructorsAndTrainees/tasks/dialoglistsubproc.cpp
Normal file
35
InstructorsAndTrainees/tasks/dialoglistsubproc.cpp
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
#include <QHBoxLayout>
|
||||||
|
#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);
|
||||||
|
}
|
||||||
26
InstructorsAndTrainees/tasks/dialoglistsubproc.h
Normal file
26
InstructorsAndTrainees/tasks/dialoglistsubproc.h
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
#ifndef DIALOGLISTSUBPROC_H
|
||||||
|
#define DIALOGLISTSUBPROC_H
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
#include <QDialog>
|
||||||
|
|
||||||
|
#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
|
||||||
14
InstructorsAndTrainees/tasks/listsubproc.cpp
Normal file
14
InstructorsAndTrainees/tasks/listsubproc.cpp
Normal file
@@ -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;
|
||||||
|
}
|
||||||
23
InstructorsAndTrainees/tasks/listsubproc.h
Normal file
23
InstructorsAndTrainees/tasks/listsubproc.h
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
#ifndef LISTSUBPROC_H
|
||||||
|
#define LISTSUBPROC_H
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
#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
|
||||||
57
InstructorsAndTrainees/tasks/listsubproc.ui
Normal file
57
InstructorsAndTrainees/tasks/listsubproc.ui
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>ListSubProc</class>
|
||||||
|
<widget class="QWidget" name="ListSubProc">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>400</width>
|
||||||
|
<height>300</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_Main">
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_Info">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_Title">
|
||||||
|
<property name="text">
|
||||||
|
<string>Title</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_DMCode">
|
||||||
|
<property name="text">
|
||||||
|
<string>DM code</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_List">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_SubProc">
|
||||||
|
<property name="text">
|
||||||
|
<string>Subprocedures</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QListWidget" name="listWidget"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
Reference in New Issue
Block a user