API Documentation
Loading...
Searching...
No Matches
QCustomValidator Class Reference

#include <QCustomValidator.h>

Inheritance diagram for QCustomValidator:
[legend]
Collaboration diagram for QCustomValidator:
[legend]

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

 QCustomValidator (QObject *parent=nullptr)
 
 QCustomValidator (const TypeInfo &info, QObject *parent=nullptr)
 
 QCustomValidator (const QCustomValidator &validator)
 
virtual ~QCustomValidator ()
 
void fixup (QString &input) const override
 
Stringfixup (String &input, bool to_unit=true, bool from_unit=true) const
 
QValidator::State validate (QString &input, int &pos) const override
 
ValidityMessage getMessage (const String &input) const
 
TranslatedString getMessageString (ValidityMessage message)
 
void setNumberOfDecimals (uint04 decimals)
 
void setCustomCallback (const std::function< ValidityMessage(const String &)> &callback)
 
void setAllowWrapping (bool allow_wrapping)
 
void setAllowEmpty (bool allow_empty)
 
void setMax (fltp08 max)
 
void setMin (fltp08 min)
 
template<class t_angle_type >
void setMax (Angle< t_angle_type > max)
 
template<class t_angle_type >
void setMin (Angle< t_angle_type > min)
 
fltp08 max () const
 
fltp08 min () const
 
void setStep (fltp08 step)
 
fltp08 step () const
 
void setRegex (const String &regex)
 
const Stringregex () const
 
void setUnitValidator (const ConstPointer< Unit > &unit, uint01 dimension=Constant< uint01 >::NaN)
 
void setUnitType (UnitType type)
 
const ConstPointer< Unit > & unit () const
 
const UnitTypeunitType () const
 
void setTypeInfo (const TypeInfo &info)
 
const TypeInfotypeInfo () const
 
uint01 unitDimension () const
 
const QCustomValidatoroperator= (const QCustomValidator &other)
 

Member Enumeration Documentation

◆ ValidityMessage

Enumerator
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 

Constructor & Destructor Documentation

◆ QCustomValidator() [1/3]

QCustomValidator ( QObject * parent = nullptr)
explicit

◆ QCustomValidator() [2/3]

QCustomValidator ( const TypeInfo & info,
QObject * parent = nullptr )
explicit

◆ QCustomValidator() [3/3]

QCustomValidator ( const QCustomValidator & validator)

◆ ~QCustomValidator()

~QCustomValidator ( )
virtual

Member Function Documentation

◆ fixup() [1/2]

void fixup ( QString & input) const
override

◆ fixup() [2/2]

String & fixup ( String & input,
bool to_unit = true,
bool from_unit = true ) const

◆ getMessage()

QCustomValidator::ValidityMessage getMessage ( const String & input) const

◆ getMessageString()

TranslatedString getMessageString ( ValidityMessage message)

◆ max()

fltp08 max ( ) const
inlinenodiscard

◆ min()

fltp08 min ( ) const
inlinenodiscard

◆ operator=()

const QCustomValidator & operator= ( const QCustomValidator & other)

◆ regex()

const String & regex ( ) const
inlinenodiscard

◆ setAllowEmpty()

void setAllowEmpty ( bool allow_empty)
inline

◆ setAllowWrapping()

void setAllowWrapping ( bool allow_wrapping)
inline

◆ setCustomCallback()

void setCustomCallback ( const std::function< ValidityMessage(const String &)> & callback)
inline

◆ setMax() [1/2]

template<class t_angle_type >
void setMax ( Angle< t_angle_type > max)
inline

◆ setMax() [2/2]

void setMax ( fltp08 max)
inline

◆ setMin() [1/2]

template<class t_angle_type >
void setMin ( Angle< t_angle_type > min)
inline

◆ setMin() [2/2]

void setMin ( fltp08 min)
inline

◆ setNumberOfDecimals()

void setNumberOfDecimals ( uint04 decimals)
inline

◆ setRegex()

void setRegex ( const String & regex)

◆ setStep()

void setStep ( fltp08 step)
inline

◆ setTypeInfo()

void setTypeInfo ( const TypeInfo & info)
inline

◆ setUnitType()

void setUnitType ( UnitType type)

◆ setUnitValidator()

void setUnitValidator ( const ConstPointer< Unit > & unit,
uint01 dimension = Constant<uint01>::NaN )

◆ step()

fltp08 step ( ) const
nodiscard

◆ typeInfo()

const TypeInfo & typeInfo ( ) const
inlinenodiscard

◆ unit()

const ConstPointer< Unit > & unit ( ) const
inlinenodiscard

◆ unitDimension()

uint01 unitDimension ( ) const
inlinenodiscard

◆ unitType()

const UnitType & unitType ( ) const
inlinenodiscard

◆ validate()

QValidator::State validate ( QString & input,
int & pos ) const
override

The documentation for this class was generated from the following files: