mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-27 19:45:43 +03:00
GUI. Заготовка под список подпроцедур 2
This commit is contained in:
@@ -471,7 +471,7 @@ void AMMtasksWidget::on_treeWidgetDoubleClicked(QTreeWidgetItem *item, int colum
|
||||
return;
|
||||
|
||||
dlgListSubProc = new DialogListSubProc(connectorToServer, this);
|
||||
//dlgListSubProc->setTask(&task);
|
||||
dlgListSubProc->setTask(&task);
|
||||
dlgListSubProc->exec();
|
||||
|
||||
//if(dlgListSubProc->getFlChanged())
|
||||
|
||||
@@ -31,5 +31,5 @@ void DialogListSubProc::closeEvent(QCloseEvent *event)
|
||||
|
||||
void DialogListSubProc::setTask(TaskAmmFim *task)
|
||||
{
|
||||
//listSubProc->setTask(task);
|
||||
listSubProc->setTask(task);
|
||||
}
|
||||
|
||||
@@ -3,12 +3,41 @@
|
||||
|
||||
ListSubProc::ListSubProc(ConnectorToServer* connectorToServer, QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::ListSubProc)
|
||||
ui(new Ui::ListSubProc),
|
||||
waitAnimationWidget(nullptr)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
waitAnimationWidget = new WaitAnimationWidget;
|
||||
QMovie *movie = new QMovie(":/resources/icons/762.gif");
|
||||
waitAnimationWidget->setParent(this);
|
||||
waitAnimationWidget->initialize(movie,this);
|
||||
}
|
||||
|
||||
ListSubProc::~ListSubProc()
|
||||
{
|
||||
waitAnimationWidget->hideWithStop();
|
||||
delete waitAnimationWidget;
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void ListSubProc::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void ListSubProc::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
QSize size = event->size();
|
||||
waitAnimationWidget->resize(size);
|
||||
}
|
||||
|
||||
void ListSubProc::setTask(TaskAmmFim *task)
|
||||
{
|
||||
this->task = *task;
|
||||
|
||||
ui->lbl_Title->setText(task->ammProcedure.title);
|
||||
ui->lbl_DMCode->setText(task->ammProcedure.dmCode);
|
||||
|
||||
waitAnimationWidget->showWithPlay();
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define LISTSUBPROC_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QResizeEvent>
|
||||
#include "connectorToServer.h"
|
||||
|
||||
namespace Ui {
|
||||
@@ -16,8 +17,17 @@ public:
|
||||
explicit ListSubProc(ConnectorToServer* connectorToServer, QWidget *parent = nullptr);
|
||||
~ListSubProc();
|
||||
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
|
||||
void setTask(TaskAmmFim* task);
|
||||
|
||||
private:
|
||||
Ui::ListSubProc *ui;
|
||||
|
||||
TaskAmmFim task;
|
||||
|
||||
WaitAnimationWidget *waitAnimationWidget;
|
||||
};
|
||||
|
||||
#endif // LISTSUBPROC_H
|
||||
|
||||
@@ -19,14 +19,14 @@
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_Info">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_Title">
|
||||
<widget class="QLabel" name="lbl_Title">
|
||||
<property name="text">
|
||||
<string>Title</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_DMCode">
|
||||
<widget class="QLabel" name="lbl_DMCode">
|
||||
<property name="text">
|
||||
<string>DM code</string>
|
||||
</property>
|
||||
|
||||
Reference in New Issue
Block a user