Version: 9.12.0
QtxDoubleValidator Class Reference

Validator for double numbers with possibility to fix up the invalid value. More...

#include <QtxValidator.h>

Inheritance diagram for QtxDoubleValidator:
Inheritance graph

Public Member Functions

 QtxDoubleValidator (QObject *)
 Constructor. More...
 
 QtxDoubleValidator (const double, const double, const int, QObject *)
 Constructor. More...
 
virtual ~QtxDoubleValidator ()
 Destructor. More...
 
virtual void fixup (QString &) const
 Validate the input and fixup it if necessary. More...
 

Detailed Description

Validator for double numbers with possibility to fix up the invalid value.

Constructor & Destructor Documentation

◆ QtxDoubleValidator() [1/2]

QtxDoubleValidator::QtxDoubleValidator ( QObject parent)

Constructor.

Parameters
parentparent object

◆ QtxDoubleValidator() [2/2]

QtxDoubleValidator::QtxDoubleValidator ( const double  bot,
const double  top,
const int  dec,
QObject parent 
)

Constructor.

Parameters
botminimum possible value
topmaximum possible value
decprecision (number of digits after dot)
parentparent object

◆ ~QtxDoubleValidator()

QtxDoubleValidator::~QtxDoubleValidator ( )
virtual

Destructor.

Member Function Documentation

◆ fixup()

void QtxDoubleValidator::fixup ( QString &  str) const
virtual

Validate the input and fixup it if necessary.

If the string represents double value less then minimum value, it becomes equal to the minimum. if the string represents double value more then mazimum value, it becomes equal to the maximum. If the string is not evaluated as double it becomes equal to 0.

Parameters
strthe string to be validated

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