| 
    QGIS API Documentation 3.99.0-Master (f78f5286a64)
    
   | 
 
A custom validator which allows entry of doubles in a locale-tolerant way. More...
#include <qgsdoublevalidator.h>

Public Member Functions | |
| QgsDoubleValidator (const QRegularExpression &expression, double bottom, double top, QObject *parent) | |
| Constructor for QgsDoubleValidator.   | |
| QgsDoubleValidator (double bottom, double top, int decimal, QObject *parent) | |
| Constructor for QgsDoubleValidator.   | |
| QgsDoubleValidator (double bottom, double top, QObject *parent) | |
| Constructor for QgsDoubleValidator.   | |
| QgsDoubleValidator (int decimal, QObject *parent) | |
| Constructor for QgsDoubleValidator.   | |
| QgsDoubleValidator (QObject *parent) | |
| Constructor for QgsDoubleValidator.   | |
| double | bottom () const | 
| Returns top range limit.   | |
| void | setBottom (double bottom) | 
| Set top range limit.   | |
| void | setMaxDecimals (int maxDecimals) | 
| Sets the number of decimals accepted by the validator to maxDecimals.   | |
| virtual void | setRange (double bottom, double top) | 
| Set bottom and top range limits.   | |
| void | setTop (double top) | 
| Set top range limit.   | |
| double | top () const | 
| Returns top range limit.   | |
| QValidator::State | validate (QString &input) const | 
| Evaluates input string validity according to QRegularExpression and ability to be converted in double value.   | |
| QValidator::State | validate (QString &input, int &) const override | 
Static Public Member Functions | |
| static double | toDouble (const QString &input) | 
| Converts input string to double value.   | |
| static double | toDouble (const QString &input, bool *ok) | 
| Converts input string to double value.   | |
A custom validator which allows entry of doubles in a locale-tolerant way.
QgsDoubleValidator is a QLineEdit Validator that combines QDoubleValidator and QRegularExpressionValidator to allow users to enter doubles with both local and C interpretation as a fallback.
Definition at line 42 of file qgsdoublevalidator.h.
      
  | 
  explicit | 
Constructor for QgsDoubleValidator.
Definition at line 31 of file qgsdoublevalidator.cpp.
| QgsDoubleValidator::QgsDoubleValidator | ( | const QRegularExpression & | expression, | 
| double | bottom, | ||
| double | top, | ||
| QObject * | parent | ||
| ) | 
Constructor for QgsDoubleValidator.
| bottom | the minimal range limit accepted by the validator | 
| top | the maximal range limit accepted by the validator | 
| parent | parent object | 
| expression | custom regular expression | 
Definition at line 44 of file qgsdoublevalidator.cpp.
| QgsDoubleValidator::QgsDoubleValidator | ( | double | bottom, | 
| double | top, | ||
| QObject * | parent | ||
| ) | 
Constructor for QgsDoubleValidator.
| bottom | the minimal range limit accepted by the validator | 
| top | the maximal range limit accepted by the validator | 
| parent | parent object | 
Definition at line 52 of file qgsdoublevalidator.cpp.
| QgsDoubleValidator::QgsDoubleValidator | ( | double | bottom, | 
| double | top, | ||
| int | decimal, | ||
| QObject * | parent | ||
| ) | 
Constructor for QgsDoubleValidator.
| bottom | the minimal range limit accepted by the validator | 
| top | the maximal range limit accepted by the validator | 
| decimal | the number of decimals accepted by the validator | 
| parent | parent object | 
Definition at line 65 of file qgsdoublevalidator.cpp.
| QgsDoubleValidator::QgsDoubleValidator | ( | int | decimal, | 
| QObject * | parent | ||
| ) | 
Constructor for QgsDoubleValidator.
| decimal | the number of decimals accepted by the validator | 
| parent | parent object | 
Definition at line 78 of file qgsdoublevalidator.cpp.
      
  | 
  inline | 
      
  | 
  inline | 
| void QgsDoubleValidator::setMaxDecimals | ( | int | maxDecimals | ) | 
Sets the number of decimals accepted by the validator to maxDecimals.
Definition at line 91 of file qgsdoublevalidator.cpp.
      
  | 
  inlinevirtual | 
Set bottom and top range limits.
Definition at line 139 of file qgsdoublevalidator.h.
      
  | 
  inline | 
Set top range limit.
Definition at line 132 of file qgsdoublevalidator.h.
      
  | 
  static | 
Converts input string to double value.
It uses locale interpretation first and C locale interpretation as fallback
Definition at line 144 of file qgsdoublevalidator.cpp.
      
  | 
  static | 
Converts input string to double value.
It uses locale interpretation first and C locale interpretation as fallback
Definition at line 150 of file qgsdoublevalidator.cpp.
      
  | 
  inline | 
| QValidator::State QgsDoubleValidator::validate | ( | QString & | input | ) | const | 
Evaluates input string validity according to QRegularExpression and ability to be converted in double value.
Definition at line 122 of file qgsdoublevalidator.cpp.
      
  | 
  override | 
Definition at line 100 of file qgsdoublevalidator.cpp.