You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AppFlow/CFDStruct/CUIProperty/CUITabWidget.cpp

29 lines
653 B
C++

#include "CUITabWidget.h"
#include<CUIConfig.h>
#include<CUIConfig.h>
#include<CUI.h>
/**
* @brief CUITabWidget::CUITabWidget 构造函数
* @param conf 配置信息
* @param parent
*/
CUITabWidget::CUITabWidget(CUIConfig* conf, QVector<CUI*> &subCUI, QWidget *parent) : QTabWidget(parent)
{
this->conf = conf;
iniUI(subCUI);
}
/**
* @brief CUITabWidget::iniUI 根据配置信息初始化
*/
void CUITabWidget::iniUI(QVector<CUI*> &subCUI)
{
for(auto conf : conf->getSub()) {
CUI* subui = new CUI(nullptr, conf);
subCUI.push_back(subui);
this->addTab(subui->getUI(), conf->getPropertyValue("name"));
}
}