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

42 lines
897 B
C

3 weeks ago
#ifndef CUILINEEDIT_H
#define CUILINEEDIT_H
#include <QWidget>
3 weeks ago
#include <QLineEdit>
#include "CUIPropertyAPI.h"
#include "CUIComponentBase.h"
#include "CUIComponentBaseWidget.h"
3 weeks ago
class CUIConfig;
class QLabel;
class QHBoxLayout;
class CUI;
class CUIPropertyAPI CUILineEdit : public CUIComponentBaseWidget, public CUIComponentBase
3 weeks ago
{
Q_OBJECT
public:
explicit CUILineEdit(CUIConfig* config, QVector<CUI*> &subCUI, QWidget *parent = nullptr);
qint32 getLabelWidth();
void setLabelWidth(qint32 width);
private:
void iniUI(QVector<CUI*> &subCUI);
// 设置格式校验器
void setValidator();
// 设置输入提示
void setInputTips();
void showRangeError();
3 weeks ago
QLabel* m_label;
QLineEdit* m_lineEdit;
QHBoxLayout* m_layout;
3 weeks ago
// QString lastEdited;
3 weeks ago
signals:
private slots:
void onTextChanged(const QString &text);
};
#endif // CUILINEEDIT_H