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

53 lines
1.0 KiB
C++

#ifndef CUI_H
#define CUI_H
#include<QtGlobal>
#include<QSet>
class CUIConfig;
class QWidget;
class CUIWidget;
class CUIGroupBox;
class CUILineEdit;
class CUITabWidget;
class QString;
class CUIComboBox;
class CUIPushButton;
class CUICheckBox;
class CUIRadioButton;
class CUIButtonBox;
/**
* @brief The CUI class 管理类,通过处理config来创建相应的组件并提供服务
*/
class CUI
{
public:
CUI(CUIConfig* conf);
void buildUI();
void check();
QWidget* getUI();
QString getProperty(QString s);
void autoArrangeWidgets();
private:
CUIConfig* conf;
CUILineEdit* uiLineEdit;
CUIWidget* uiWidget;
CUIGroupBox* uiGroupBox;
CUITabWidget* uiTabWidget;
CUIComboBox* uiComboBox;
CUIPushButton* uiPushButton;
CUICheckBox* uiCheckBox;
CUIRadioButton* uiRadioButton;
CUIButtonBox* uiButtonBox;
QVector<CUI*> subCUI;
const QSet<QString> haveLabelType = {"LineEdit","ComboBox"};
qint32 getMaxLabelWidth();
void setLabelWidth(qint32 width);
};
#endif // CUI_H