#ifndef CUI_H #define CUI_H #include #include 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 subCUI; const QSet haveLabelType = {"LineEdit","ComboBox"}; qint32 getMaxLabelWidth(); void setLabelWidth(qint32 width); }; #endif // CUI_H