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

37 lines
847 B
C++

#include "CUIComponentBaseWidget.h"
#include "CUIConfig.h"
#include <QHBoxLayout>
#include <QVBoxLayout>
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 == "QHBoxLayout") {
layout = new QHBoxLayout;
} else {
layout = new QVBoxLayout;
}
layout->setSpacing(0);
layout->setMargin(0);
return layout;
}
void CUIComponentBaseWidget::initUI() {
}
qint32 CUIComponentBaseWidget::getLabelWidth() {
return 100;
}
void CUIComponentBaseWidget::setLabelWidth(qint32 width) {
}