#include "CUIContainerGroupBox.h" #include #include #include #include #include /** * @brief CUIContainerGroupBox::CUIContainerGroupBox 构造函数 * @param conf * @param parent */ CUIContainerGroupBox::CUIContainerGroupBox(CUIConfig* conf, QVector& subCUI, QWidget* parent) : CUIComponentBaseContainerWidget(parent) { this->m_conf = conf; initUI(subCUI); } /** * @brief CUIContainerGroupBox::initUI 根据配置信息进行初始化 */ void CUIContainerGroupBox::initUI(QVector& subCUI) { m_groupBox = new QGroupBox; m_groupBox->setTitle(m_conf->getPropertyValue("name")); m_layout = this->getLayout(m_conf); m_groupBox->setLayout(m_layout); for (auto conf : this->m_conf->getSub()) { CUIPropertyWidget* tmp = new CUIPropertyWidget(nullptr, conf); subCUI.push_back(tmp); m_layout->addWidget(tmp->getUI()); } QVBoxLayout* mainLayout = new QVBoxLayout; mainLayout->addWidget(m_groupBox); this->setLayout(mainLayout); }