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

33 lines
758 B
C++

3 weeks ago
#include "CUICommon.h"
#include<QLayout>
#include<QString>
#include<QVBoxLayout>
#include<QHBoxLayout>
#include<QFormLayout>
#include<CUIConfig.h>
//CUICommon::CUICommon()
//{
//}
/**
* @brief CUICommon::appLayout layoutlayout
* @param conf
* @return layout
*/
QLayout* CUICommon::appLayout(CUIConfig* conf)
{
QLayout* res_layout;
// QString confLayout = conf->property["layout"];
QString confLayout = conf->getPropertyValue("layout");
3 weeks ago
if(confLayout == "QVBoxLayout")
res_layout = new QVBoxLayout;
else if (confLayout == "QHBoxLayout") {
res_layout = new QHBoxLayout;
}else {
res_layout = new QVBoxLayout;
}
return res_layout;
}