#include "DataProcessingWidget.h" #include "EvalReportWidget.h" #include #include #include DataProcessingWidget::DataProcessingWidget(ProjectInfo *proj, QWidget *parent) : EvalWidget(proj, parent) { setTitle("评估数据处理"); m_exportReport = new PushButton("导出报告", this); m_topLayout->addStretch(); m_topLayout->addWidget(m_exportReport); connect(m_exportReport, &PushButton::clicked, this, &DataProcessingWidget::slotExportReport); } void DataProcessingWidget::setType(int type) { EvalWidget::setType(type); setupTabWidget(); } void DataProcessingWidget::slotExportReport() { EvalReportWidget *w = (EvalReportWidget *)m_tab->currentWidget(); w->exportReport(); } void DataProcessingWidget::setupTabWidget() { m_tab->clear(); for (int i : indexList()) { EvalReportWidget *m = new EvalReportWidget(m_proj, i, this); ProjectManager::IndexType t = (ProjectManager::IndexType)i; QString s = ProjectManager::nameOfIndexType(t); m_tab->addTab(m, s); } }