Version: 6.3.1
Public Member Functions

QtxDoubleValidator Class Reference

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

#include <QtxValidator.h>

Inheritance diagram for QtxDoubleValidator:
Inheritance graph

Public Member Functions

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

Constructor & Destructor Documentation

QtxDoubleValidator::QtxDoubleValidator ( QObject parent)
Parameters:
parentparent object
QtxDoubleValidator::QtxDoubleValidator ( const double  bot,
const double  top,
const int  dec,
QObject parent 
)
Parameters:
botminimum possible value
topmaximum possible value
decprecision (number of digits after dot)
parentparent object
QtxDoubleValidator::~QtxDoubleValidator ( ) [virtual]

Member Function Documentation

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

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
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS