mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 17:35:34 +08:00
Ref T265, Ref T430, Ref T473 improved validator for parts
This commit is contained in:
committed by
Mat Sutcliffe
parent
d89b217e9b
commit
6bd3a50ed8
@@ -36,6 +36,9 @@ namespace BlackGui
|
||||
//! Set restrictions
|
||||
void setRestrictions(const QStringList &restrictions) { m_restrictions = restrictions; }
|
||||
|
||||
//! Allowed characters
|
||||
void setAllowedCharacters(const QString &chars) { m_allowedCharacters = chars.toUpper(); }
|
||||
|
||||
//! \copydoc QValidator::validate
|
||||
virtual State validate(QString &input, int &pos) const override;
|
||||
|
||||
@@ -46,6 +49,7 @@ namespace BlackGui
|
||||
bool m_optionalValue = false; //!< allow empty
|
||||
int m_minLength = 0;
|
||||
int m_maxLength = 32678; //!< standard length
|
||||
QString m_allowedCharacters; //!< allowedCharacters
|
||||
QStringList m_restrictions; //!< list of allowed strings
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user