Validator for double numbers with possibility to fix up the invalid value.
#include <QtxValidator.h>
Constructor & Destructor Documentation
| QtxDoubleValidator::QtxDoubleValidator |
( |
QObject * |
parent | ) |
|
| QtxDoubleValidator::QtxDoubleValidator |
( |
const double |
bot, |
|
|
const double |
top, |
|
|
const int |
dec, |
|
|
QObject * |
parent |
|
) |
| |
- Parameters:
-
| bot | minimum possible value |
| top | maximum possible value |
| dec | precision (number of digits after dot) |
| parent | parent 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:
-
| str | the string to be validated |