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.
|
|
|
|
#include "CUICommon.h"
|
|
|
|
|
|
|
|
|
|
#include<QLayout>
|
|
|
|
|
#include<QString>
|
|
|
|
|
#include<QVBoxLayout>
|
|
|
|
|
#include<QHBoxLayout>
|
|
|
|
|
#include<QFormLayout>
|
|
|
|
|
#include<CUIConfig.h>
|
|
|
|
|
//CUICommon::CUICommon()
|
|
|
|
|
//{
|
|
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief CUICommon::appLayout 自动提取layout配置信息,根据设置返回layout
|
|
|
|
|
* @param conf 配置信息
|
|
|
|
|
* @return layout的引用
|
|
|
|
|
*/
|
|
|
|
|
QLayout* CUICommon::appLayout(CUIConfig* conf)
|
|
|
|
|
{
|
|
|
|
|
QLayout* res_layout;
|
|
|
|
|
// QString confLayout = conf->property["layout"];
|
|
|
|
|
QString confLayout = conf->getPropertyValue("layout");
|
|
|
|
|
if(confLayout == "QVBoxLayout")
|
|
|
|
|
res_layout = new QVBoxLayout;
|
|
|
|
|
else if (confLayout == "QHBoxLayout") {
|
|
|
|
|
res_layout = new QHBoxLayout;
|
|
|
|
|
}else {
|
|
|
|
|
res_layout = new QVBoxLayout;
|
|
|
|
|
}
|
|
|
|
|
return res_layout;
|
|
|
|
|
}
|