#include "CUIButtonBox.h" #include #include #include #include #include #include #include /** * @brief CUIButtonBox::CUIButtonBox 构造函数 * @param conf * @param subCUI * @param parent */ CUIButtonBox::CUIButtonBox(CUIConfig* conf, QVector &subCUI, QWidget *parent) : CUIComponentBaseContainerWidget(parent) { this->conf = conf; initUI(subCUI); } /** * @brief CUIButtonBox::initUI 初始化 * @param subCUI */ void CUIButtonBox::initUI(QVector &subCUI) { m_groupBox = new QGroupBox; m_groupBox->setTitle(conf->getPropertyValue("name")); m_layout = this->getLayout(conf); m_groupBox->setLayout(m_layout); for(auto conf : this->conf->getSub()) { QRadioButton* radio = new QRadioButton(conf->getPropertyValue("name")); m_layout->addWidget(radio); } QVBoxLayout* mainLayout = new QVBoxLayout; mainLayout->addWidget(m_groupBox); this->setLayout(mainLayout); }