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/CUIWidget.cpp

35 lines
744 B
C++

3 weeks ago
#include "CUIWidget.h"
#include "CUIConfig.h"
#include "QVBoxLayout"
#include <QLayout>
#include <CUI.h>
#include<QDebug>
/**
* @brief CUIWidget::CUIWidget
* @param conf
* @param parent
*/
CUIWidget::CUIWidget(CUIConfig *conf, QVector<CUI*> &subCUI, QWidget *parent): CUIComponentBaseContainerWidget(parent)
3 weeks ago
{
this->m_conf = conf;
3 weeks ago
iniUI(subCUI);
}
/**
* @brief CUIWidget::iniUI
*/
void CUIWidget::iniUI(QVector<CUI*> &subCUI)
{
m_layout = this->getLayout(m_conf);
this->setLayout(m_layout);
for(auto &conf : this->m_conf->getSub()) {
CUI* tmp = new CUI(nullptr, conf);
3 weeks ago
subCUI.push_back(tmp);
m_layout->addWidget(tmp->getUI());
3 weeks ago
}
}