KDEUI
knumvalidator.cpp
Go to the documentation of this file.
184KFloatValidator::KFloatValidator ( double bottom, double top, bool localeAware, QWidget * parent )
219 else if (newStr == QLatin1String(".") || (d->acceptLocalizedNumbers && newStr==KGlobal::locale()->decimalSymbol())) // another special case
void setAcceptLocalizedNumbers(bool accept)
Sets whether to accept localized numbers (default: true)
Definition: knumvalidator.cpp:322
KDoubleValidator(QObject *parent)
Constuct a locale-aware KDoubleValidator with default range (whatever QDoubleValidator uses for that)...
Definition: knumvalidator.cpp:302
virtual QValidator::State validate(QString &input, int &pos) const
Overloaded for internal reasons.
Definition: knumvalidator.cpp:326
virtual void setRange(double bottom, double top)
Sets the minimum and maximum value allowed.
Definition: knumvalidator.cpp:269
void setAcceptLocalizedNumbers(bool b)
Sets the validator to be locale aware if is true.
Definition: knumvalidator.cpp:196
virtual double top() const
Returns the current maximum value allowed.
Definition: knumvalidator.cpp:283
virtual State validate(QString &, int &) const
Validates the text, and return the result.
Definition: knumvalidator.cpp:206
virtual void fixup(QString &) const
Fixes the text if possible, providing a valid string.
Definition: knumvalidator.cpp:247
bool acceptLocalizedNumbers() const
Returns true if the validator is locale aware.
Definition: knumvalidator.cpp:201
virtual double bottom() const
Returns the current minimum value allowed.
Definition: knumvalidator.cpp:278
virtual State validate(QString &, int &) const
Validates the text, and return the result.
Definition: knumvalidator.cpp:66
virtual void setRange(int bottom, int top)
Sets the minimum and maximum values allowed.
Definition: knumvalidator.cpp:123
virtual int bottom() const
Returns the current minimum value allowed.
Definition: knumvalidator.cpp:139
virtual void fixup(QString &) const
Fixes the text if possible, providing a valid string.
Definition: knumvalidator.cpp:101
QString thousandsSeparator() const
QString decimalSymbol() const
QString positiveSign() const
double readNumber(const QString &numStr, bool *ok=0) const
QString negativeSign() const
#define kWarning
KLocale * locale()
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.