API Documentation
|
Responsible on most user input fields for correcting the input when possible or allerting the user that the input is incorrect. Used on all QCustomLineEdit widgets and derivatives. More...
#include <QCustomValidator.h>
Public Types | |
enum | ValidityMessage { e_is_valid , e_unexpected_format , e_value_is_not_a_real_number , e_too_many_decimals , e_value_too_high , e_value_too_low , e_value_is_empty , e_string_is_too_long , e_string_is_too_short , e_file_exists } |
Public Member Functions | |
void | fixup (QString &input) const override |
String & | fixup (String &input, bool to_unit=true, bool from_unit=true) const |
ValidityMessage | getMessage (const String &input) const |
TranslatedString | getMessageString (ValidityMessage message) |
fltp08 | max () const |
fltp08 | min () const |
const QCustomValidator & | operator= (const QCustomValidator &other) |
QCustomValidator (const QCustomValidator &validator) | |
QCustomValidator (const TypeInfo &info, QObject *parent=nullptr) | |
QCustomValidator (QObject *parent=nullptr) | |
const String & | regex () const |
void | setAllowEmpty (bool allow_empty) |
void | setAllowWrapping (bool allow_wrapping) |
void | setCustomCallback (const std::function< ValidityMessage(const String &)> &callback) |
template<class t_angle_type > | |
void | setMax (Angle< t_angle_type > max) |
void | setMax (fltp08 max) |
template<class t_angle_type > | |
void | setMin (Angle< t_angle_type > min) |
void | setMin (fltp08 min) |
void | setNumberOfDecimals (uint04 decimals) |
void | setRegex (const String ®ex) |
void | setStep (fltp08 step) |
void | setTypeInfo (const TypeInfo &info) |
void | setUnitType (UnitCategory type) |
void | setUnitValidator (const ConstPointer< Unit > &unit, uint01 dimension=Constant< uint01 >::Invalid) |
fltp08 | step () const |
const TypeInfo & | typeInfo () const |
const ConstPointer< Unit > & | unit () const |
uint01 | unitDimension () const |
const UnitCategory & | unitType () const |
QValidator::State | validate (QString &input, int &pos) const override |
virtual | ~QCustomValidator () |
Responsible on most user input fields for correcting the input when possible or allerting the user that the input is incorrect. Used on all QCustomLineEdit widgets and derivatives.
enum ValidityMessage |
|
explicit |
|
explicit |
QCustomValidator | ( | const QCustomValidator & | validator | ) |
|
virtual |
|
override |
ValidityMessage getMessage | ( | const String & | input | ) | const |
TranslatedString getMessageString | ( | ValidityMessage | message | ) |
|
inlinenodiscard |
|
inlinenodiscard |
const QCustomValidator & operator= | ( | const QCustomValidator & | other | ) |
|
inlinenodiscard |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void setRegex | ( | const String & | regex | ) |
|
inline |
|
inline |
void setUnitType | ( | UnitCategory | type | ) |
void setUnitValidator | ( | const ConstPointer< Unit > & | unit, |
uint01 | dimension = Constant< uint01 >::Invalid ) |
|
nodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
override |