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.
27 lines
618 B
C++
27 lines
618 B
C++
2 weeks ago
|
#include "CUIComponentBaseWidget.h"
|
||
|
#include "CUIConfig.h"
|
||
|
|
||
|
#include <QVBoxLayout>
|
||
|
#include <QHBoxLayout>
|
||
|
|
||
|
CUIComponentBaseWidget::CUIComponentBaseWidget(QWidget *parent) : QWidget(parent)
|
||
|
{
|
||
|
}
|
||
|
|
||
|
QLayout *CUIComponentBaseWidget::getLayout(CUIConfig *conf)
|
||
|
{
|
||
|
if (!conf) {
|
||
|
return new QVBoxLayout;
|
||
|
}
|
||
|
QLayout* layout;
|
||
|
QString layoutConf = conf->getPropertyValue("layout");
|
||
|
if (layoutConf == "QVBoxLayout") {
|
||
|
layout = new QVBoxLayout;
|
||
|
} else if (layoutConf == "QVBoxLayout") {
|
||
|
layout = new QHBoxLayout;
|
||
|
} else {
|
||
|
layout = new QHBoxLayout;
|
||
|
}
|
||
|
return layout;
|
||
|
}
|