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/CUIPropertyWidget.h

39 lines
996 B
C

#ifndef CUIPROPERTYWIDGET_H
#define CUIPROPERTYWIDGET_H
3 weeks ago
#include<QtGlobal>
#include<QSet>
#include<QWidget>
#include "CUIPropertyAPI.h"
3 weeks ago
class CUIConfig;
class QWidget;
class CUIComponentBaseWidget;
3 weeks ago
/**
* @brief The CUI class ,config
*/
class CUIPropertyAPI CUIPropertyWidget: public QWidget
3 weeks ago
{
Q_OBJECT
3 weeks ago
public:
CUIPropertyWidget(QWidget* parent = nullptr, CUIConfig* conf = nullptr);
3 weeks ago
void buildUI();
void check();
QWidget* getUI();
QString getProperty(QString s);
void autoArrangeWidgets();
private:
CUIConfig* conf;
// 根据配置生成的视图
CUIComponentBaseWidget* m_mainWidget = nullptr;
// 子组件配置
QVector<CUIPropertyWidget*> subCUI;
// 具有label标签的类型需要处理长度统一
const QSet<QString> haveLabelType = {"LineEdit", "ComboBox"};
3 weeks ago
qint32 getMaxLabelWidth();
void setLabelWidth(qint32 width);
};
#endif // CUIPROPERTYWIDGET_H