mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
Перед передачей репортов вместе с задачами
This commit is contained in:
@@ -1,9 +1,10 @@
|
|||||||
#include "dialogchecktask.h"
|
#include "dialogchecktask.h"
|
||||||
#include "ui_dialogchecktask.h"
|
#include "ui_dialogchecktask.h"
|
||||||
|
|
||||||
DialogCheckTask::DialogCheckTask(QWidget *parent) :
|
DialogCheckTask::DialogCheckTask(ConnectorToServer* connectorToServer, QWidget *parent) :
|
||||||
QWidget(parent),
|
QWidget(parent),
|
||||||
ui(new Ui::DialogCheckTask),
|
ui(new Ui::DialogCheckTask),
|
||||||
|
connectorToServer(connectorToServer),
|
||||||
fimTasksWidget(nullptr)
|
fimTasksWidget(nullptr)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
@@ -11,6 +12,16 @@ DialogCheckTask::DialogCheckTask(QWidget *parent) :
|
|||||||
fimTasksWidget = new FIMtasksWidget(nullptr, FIMtasksWidget::TypeList::listOneTask, this);
|
fimTasksWidget = new FIMtasksWidget(nullptr, FIMtasksWidget::TypeList::listOneTask, this);
|
||||||
|
|
||||||
ui->horizontalLayout_3->addWidget(fimTasksWidget);
|
ui->horizontalLayout_3->addWidget(fimTasksWidget);
|
||||||
|
|
||||||
|
/*
|
||||||
|
ui->plainText->appendHtml("<b>1 Hello World</b>");
|
||||||
|
ui->plainText->appendHtml("<p>2 Hello World</p>");
|
||||||
|
ui->plainText->appendHtml("<em>3 Hello World</em>");
|
||||||
|
ui->plainText->appendHtml("<mark>4 Hello World</mark>");
|
||||||
|
ui->plainText->appendHtml("<strong>5 Hello World</strong>");
|
||||||
|
|
||||||
|
ui->plainText->appendHtml("<p style=\"color:red;\">6 Hello World</p>");
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
DialogCheckTask::~DialogCheckTask()
|
DialogCheckTask::~DialogCheckTask()
|
||||||
@@ -22,10 +33,30 @@ DialogCheckTask::~DialogCheckTask()
|
|||||||
void DialogCheckTask::setTask(TaskAmmFim* task)
|
void DialogCheckTask::setTask(TaskAmmFim* task)
|
||||||
{
|
{
|
||||||
this->task = *task;
|
this->task = *task;
|
||||||
|
|
||||||
|
//Задача
|
||||||
fimTasksWidget->setOneTaskFim(&this->task);
|
fimTasksWidget->setOneTaskFim(&this->task);
|
||||||
|
|
||||||
|
//Репорт
|
||||||
|
outReport(this->task.report);
|
||||||
}
|
}
|
||||||
|
|
||||||
TaskAmmFim DialogCheckTask::getTask()
|
TaskAmmFim DialogCheckTask::getTask()
|
||||||
{
|
{
|
||||||
return this->task;
|
return this->task;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DialogCheckTask::outReport(FIMReport report)
|
||||||
|
{
|
||||||
|
//Запрашиваем отчет по этой задаче
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
for(FIMReportItem item : report.itemList)
|
||||||
|
{
|
||||||
|
ui->plainText->appendHtml("<b>Title: </b>");
|
||||||
|
ui->plainText->appendHtml("<p>DMcode: </p>");
|
||||||
|
ui->plainText->appendHtml("<p>Result: </p>");
|
||||||
|
ui->plainText->appendHtml("<p style=\"color:green;\">Text: </p>");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -14,19 +14,23 @@ class DialogCheckTask : public QWidget
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit DialogCheckTask(QWidget *parent = nullptr);
|
explicit DialogCheckTask(ConnectorToServer* connectorToServer, QWidget *parent = nullptr);
|
||||||
~DialogCheckTask();
|
~DialogCheckTask();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void setTask(TaskAmmFim* task);
|
void setTask(TaskAmmFim* task);
|
||||||
TaskAmmFim getTask();
|
TaskAmmFim getTask();
|
||||||
|
|
||||||
|
private:
|
||||||
|
void outReport(FIMReport report);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TaskAmmFim task;
|
TaskAmmFim task;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::DialogCheckTask *ui;
|
Ui::DialogCheckTask *ui;
|
||||||
private:
|
private:
|
||||||
|
ConnectorToServer* connectorToServer;
|
||||||
FIMtasksWidget* fimTasksWidget;
|
FIMtasksWidget* fimTasksWidget;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,11 @@
|
|||||||
<layout class="QHBoxLayout" name="horizontalLayout_3"/>
|
<layout class="QHBoxLayout" name="horizontalLayout_3"/>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2"/>
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QPlainTextEdit" name="plainText"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="verticalSpacer">
|
||||||
|
|||||||
@@ -498,7 +498,7 @@ void FIMtasksWidget::on_btnCheck_clicked()
|
|||||||
|
|
||||||
TaskAmmFim* task = getTaskByID(id);
|
TaskAmmFim* task = getTaskByID(id);
|
||||||
|
|
||||||
DialogCheckTask dlg(this);
|
DialogCheckTask dlg(connectorToServer, this);
|
||||||
|
|
||||||
dlg.setTask(task);
|
dlg.setTask(task);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user