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

47 lines
940 B
C++

3 weeks ago
#include "CUIWidget.h"
#include "CUIConfig.h"
#include "QVBoxLayout"
#include <QLayout>
#include <CUICommon.h>
#include <CUI.h>
#include<QDebug>
/**
* @brief CUIWidget::CUIWidget
* @param conf
* @param parent
*/
CUIWidget::CUIWidget(CUIConfig *conf, QVector<CUI*> &subCUI, QWidget *parent): QWidget(parent)
3 weeks ago
{
this->conf = conf;
iniUI(subCUI);
}
/**
* @brief CUIWidget::iniUI
*/
void CUIWidget::iniUI(QVector<CUI*> &subCUI)
{
layout = appLayout(conf);
this->setLayout(layout);
// qDebug()<<"widget add layout";
for(auto &conf : this->conf->getSub()) {
CUI* tmp = new CUI(nullptr, conf);
3 weeks ago
subCUI.push_back(tmp);
layout->addWidget(tmp->getUI());
}
}
/**
* @brief CUIWidget::getProperty
* @param key
* @return val
*/
QString CUIWidget::getProperty(QString key)
{
return conf->getPropertyValue(key);
3 weeks ago
}