#ifndef CUILINEEDIT_H #define CUILINEEDIT_H #include #include "CUIPropertyAPI.h" class CUIConfig; class QLabel; class QHBoxLayout; class CUI; class CUIPropertyAPI CUILineEdit : public QWidget { Q_OBJECT public: explicit CUILineEdit(CUIConfig* config, QVector &subCUI, QWidget *parent = nullptr); bool isInRange() const; qint32 getLabelWidth(); void setLabelWidth(qint32 width); private: void iniUI(QVector &subCUI); void appSetting(); void checkType(const QString &text); void showMsg(); bool checkRange(); CUIConfig* conf; QLabel* label; QLineEdit* lineedit; // QLayout* layout; QHBoxLayout* layout; QString lastEdited; QString data_type; QString initial_value_; bool check_range_; QVariant range_min_; QVariant range_max_; bool inclusive_; bool required_; signals: private slots: void onTextChanged(const QString &text); }; #endif // CUILINEEDIT_H