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

32 lines
697 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"];
if(confLayout == "QVBoxLayout")
res_layout = new QVBoxLayout;
else if (confLayout == "QHBoxLayout") {
res_layout = new QHBoxLayout;
}else {
res_layout = new QVBoxLayout;
}
return res_layout;
}