mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
62 lines
1.5 KiB
C++
62 lines
1.5 KiB
C++
#include "reportfimwidget.h"
|
|
#include "ui_reportfimwidget.h"
|
|
#include "actionwidget.h"
|
|
#include "devicewidget.h"
|
|
|
|
ReportFimWidget::ReportFimWidget(QWidget *parent) :
|
|
QWidget(parent),
|
|
ui(new Ui::ReportFimWidget)
|
|
{
|
|
ui->setupUi(this);
|
|
ui->checkBox_MMEL->setCheckable(false);
|
|
|
|
ui->label_MMEL->setObjectName("ReportFimWidget_label_MMEL");
|
|
}
|
|
|
|
ReportFimWidget::~ReportFimWidget()
|
|
{
|
|
delete ui;
|
|
}
|
|
|
|
void ReportFimWidget::setReport(FIMReport report)
|
|
{
|
|
QString str;
|
|
|
|
//Действия обучаемого
|
|
if(!report.itemList.count())
|
|
ui->label_Actions->setVisible(false);
|
|
for(FIMReportItem item : report.itemList)
|
|
{
|
|
ActionWidget* actionW = new ActionWidget(this);
|
|
ui->verticalLayout_Actions->addWidget(actionW);
|
|
actionW->setMaximumHeight(100);
|
|
actionW->setItem(item);
|
|
}
|
|
|
|
//Устройства/приборы
|
|
bool flNeedMMEL = false;
|
|
if(!report.warehouseItemList.count())
|
|
ui->label_Devices->setVisible(false);
|
|
for(FIMReportWarehouseItem whItem : report.warehouseItemList)
|
|
{
|
|
DeviceWidget* deviceW = new DeviceWidget(this);
|
|
ui->verticalLayout_Devices->addWidget(deviceW);
|
|
//deviceW->setMaximumHeight(50);
|
|
deviceW->setItem(whItem);
|
|
|
|
if(whItem.status == 0)
|
|
flNeedMMEL = true;
|
|
}
|
|
|
|
if(flNeedMMEL)
|
|
{
|
|
ui->checkBox_MMEL->setChecked(report.mmel);
|
|
}
|
|
else
|
|
{
|
|
ui->checkBox_MMEL->setVisible(false);
|
|
ui->label_MMEL->setVisible(false);
|
|
ui->label_MMEL_text->setVisible(false);
|
|
}
|
|
}
|