34#include <NDEVR/Unit.h>
35#include <NDEVR/TypeInfo.h>
36#include <NDEVR/Pointer.h>
37#include <NDEVR/String.h>
54 , e_value_is_not_a_real_number
59 , e_string_is_too_long
60 , e_string_is_too_short
68 void fixup(QString & input)
const override;
70 QValidator::State
validate(QString& input,
int& pos)
const override;
75 m_number_of_decimals = decimals;
83 template<
class t_angle_type>
85 template<
class t_angle_type>
106 uint04 m_number_of_decimals;
111 bool m_allow_wrapping;
The primary angle storage class for this API. Stores an angle in an optimized format.
Definition StringStream.h:408
Provides a constant, unmodifiable pointer that has shared ownership of a dynamically allocated object...
Definition GraphicsPipeline.h:42
Responsible on most user input fields for correcting the input when possible or allerting.
Definition QCustomValidator.h:47
String & fixup(String &input, bool to_unit=true, bool from_unit=true) const
void setRegex(const String ®ex)
virtual ~QCustomValidator()
ValidityMessage getMessage(const String &input) const
void setStep(fltp08 step)
Definition QCustomValidator.h:89
void fixup(QString &input) const override
void setNumberOfDecimals(uint04 decimals)
Definition QCustomValidator.h:73
void setUnitType(UnitCategory type)
const ConstPointer< Unit > & unit() const
Definition QCustomValidator.h:95
void setAllowWrapping(bool allow_wrapping)
Definition QCustomValidator.h:79
uint01 unitDimension() const
Definition QCustomValidator.h:99
void setTypeInfo(const TypeInfo &info)
Definition QCustomValidator.h:97
ValidityMessage
Definition QCustomValidator.h:51
QCustomValidator(const QCustomValidator &validator)
QCustomValidator(QObject *parent=nullptr)
void setMax(fltp08 max)
Definition QCustomValidator.h:81
QValidator::State validate(QString &input, int &pos) const override
const TypeInfo & typeInfo() const
Definition QCustomValidator.h:98
fltp08 min() const
Definition QCustomValidator.h:88
const String & regex() const
Definition QCustomValidator.h:92
fltp08 max() const
Definition QCustomValidator.h:87
void setMin(Angle< t_angle_type > min)
Definition QCustomValidator.h:86
const UnitCategory & unitType() const
Definition QCustomValidator.h:96
void setAllowEmpty(bool allow_empty)
Definition QCustomValidator.h:80
void setCustomCallback(const std::function< ValidityMessage(const String &)> &callback)
Definition QCustomValidator.h:78
void setUnitValidator(const ConstPointer< Unit > &unit, uint01 dimension=Constant< uint01 >::Invalid)
QCustomValidator(const TypeInfo &info, QObject *parent=nullptr)
const QCustomValidator & operator=(const QCustomValidator &other)
void setMax(Angle< t_angle_type > max)
Definition QCustomValidator.h:84
void setMin(fltp08 min)
Definition QCustomValidator.h:82
TranslatedString getMessageString(ValidityMessage message)
The core String class for the software.
Definition String.h:47
Any text displayed to the user should be defined as a TranslatedString which allows the.
Definition TranslatedString.h:13
Stores information about a type, relevant for certain templated functions.
Definition TypeInfo.h:43
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:78
@ e_file_exists
Definition FileCache.h:13
UnitCategory
A category of unit describing what it relates to. Any category can have some number of units.
Definition Unit.h:14
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:94
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:146
Defines for a given type (such as sint04, fltp08, UUID, etc) a maximum, minimum, and reserved.
Definition BaseValues.hpp:230