|
|
@ -12,11 +12,10 @@
|
|
|
|
* @param conf
|
|
|
|
* @param conf
|
|
|
|
* @param parent
|
|
|
|
* @param parent
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
CUIContainerGroupBox::CUIContainerGroupBox(CUIConfig* conf,
|
|
|
|
CUIContainerGroupBox::CUIContainerGroupBox(CUIConfig *conf,
|
|
|
|
QVector<CUIPropertyWidget*>& subCUI,
|
|
|
|
QVector<CUIPropertyWidget *> &subCUI,
|
|
|
|
QWidget* parent)
|
|
|
|
QWidget *parent)
|
|
|
|
: CUIComponentBaseContainerWidget(parent)
|
|
|
|
: CUIComponentBaseContainerWidget(parent) {
|
|
|
|
{
|
|
|
|
|
|
|
|
this->m_conf = conf;
|
|
|
|
this->m_conf = conf;
|
|
|
|
initUI(subCUI);
|
|
|
|
initUI(subCUI);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -24,18 +23,17 @@ CUIContainerGroupBox::CUIContainerGroupBox(CUIConfig* conf,
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @brief CUIContainerGroupBox::initUI 根据配置信息进行初始化
|
|
|
|
* @brief CUIContainerGroupBox::initUI 根据配置信息进行初始化
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
void CUIContainerGroupBox::initUI(QVector<CUIPropertyWidget*>& subCUI)
|
|
|
|
void CUIContainerGroupBox::initUI(QVector<CUIPropertyWidget *> &subCUI) {
|
|
|
|
{
|
|
|
|
|
|
|
|
m_groupBox = new QGroupBox;
|
|
|
|
m_groupBox = new QGroupBox;
|
|
|
|
m_groupBox->setTitle(m_conf->getPropertyValue("name"));
|
|
|
|
m_groupBox->setTitle(m_conf->getPropertyValue("name"));
|
|
|
|
m_layout = this->getLayout(m_conf);
|
|
|
|
m_layout = this->getLayout(m_conf);
|
|
|
|
m_groupBox->setLayout(m_layout);
|
|
|
|
m_groupBox->setLayout(m_layout);
|
|
|
|
for (auto conf : this->m_conf->getSub()) {
|
|
|
|
for (auto conf : this->m_conf->getSub()) {
|
|
|
|
CUIPropertyWidget* tmp = new CUIPropertyWidget(nullptr, conf);
|
|
|
|
CUIPropertyWidget *tmp = new CUIPropertyWidget(nullptr, conf);
|
|
|
|
subCUI.push_back(tmp);
|
|
|
|
subCUI.push_back(tmp);
|
|
|
|
m_layout->addWidget(tmp->getUI());
|
|
|
|
m_layout->addWidget(tmp->getUI());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
QVBoxLayout* mainLayout = new QVBoxLayout;
|
|
|
|
QVBoxLayout *mainLayout = new QVBoxLayout;
|
|
|
|
mainLayout->addWidget(m_groupBox);
|
|
|
|
mainLayout->addWidget(m_groupBox);
|
|
|
|
this->setLayout(mainLayout);
|
|
|
|
this->setLayout(mainLayout);
|
|
|
|
}
|
|
|
|
}
|
|
|
|