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.  
 More...
#include <qgsdoublevalidator.h>
|  | 
|  | QgsDoubleValidator (const QRegularExpression &expression, double bottom, double top, QObject *parent) | 
|  | Constructor for QgsDoubleValidator.  More... 
 | 
|  | 
|  | QgsDoubleValidator (double bottom, double top, int decimal, QObject *parent) | 
|  | Constructor for QgsDoubleValidator.  More... 
 | 
|  | 
|  | QgsDoubleValidator (double bottom, double top, QObject *parent) | 
|  | Constructor for QgsDoubleValidator.  More... 
 | 
|  | 
|  | QgsDoubleValidator (int decimal, QObject *parent) | 
|  | Constructor for QgsDoubleValidator.  More... 
 | 
|  | 
|  | QgsDoubleValidator (QObject *parent) | 
|  | Constructor for QgsDoubleValidator.  More... 
 | 
|  | 
| double | bottom () const | 
|  | Returns top range limit.  More... 
 | 
|  | 
| void | setBottom (double bottom) | 
|  | Set top range limit.  More... 
 | 
|  | 
| virtual void | setRange (double bottom, double top) | 
|  | Set bottom and top range limits.  More... 
 | 
|  | 
| void | setTop (double top) | 
|  | Set top range limit.  More... 
 | 
|  | 
| double | top () const | 
|  | Returns top range limit.  More... 
 | 
|  | 
| QValidator::State | validate (QString &input) const | 
|  | Evaluates input string validity according to QRegularExpression and ability to be converted in double value.  More... 
 | 
|  | 
| QValidator::State | validate (QString &input, int &) const override | 
|  | 
|  | 
| static double | toDouble (const QString &input) | 
|  | Converts input string to double value.  More... 
 | 
|  | 
| static double | toDouble (const QString &input, bool *ok) | 
|  | Converts input string to double value.  More... 
 | 
|  | 
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. 
- Since
- QGIS 3.14 
Definition at line 40 of file qgsdoublevalidator.h.
◆ QgsDoubleValidator() [1/5]
  
  | 
        
          | QgsDoubleValidator::QgsDoubleValidator | ( | QObject * | parent | ) |  |  | explicit | 
 
 
◆ QgsDoubleValidator() [2/5]
      
        
          | QgsDoubleValidator::QgsDoubleValidator | ( | const QRegularExpression & | expression, | 
        
          |  |  | double | bottom, | 
        
          |  |  | double | top, | 
        
          |  |  | QObject * | parent | 
        
          |  | ) |  |  | 
      
 
Constructor for QgsDoubleValidator. 
- Parameters
- 
  
    | 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 40 of file qgsdoublevalidator.cpp.
 
 
◆ QgsDoubleValidator() [3/5]
      
        
          | QgsDoubleValidator::QgsDoubleValidator | ( | double | bottom, | 
        
          |  |  | double | top, | 
        
          |  |  | QObject * | parent | 
        
          |  | ) |  |  | 
      
 
Constructor for QgsDoubleValidator. 
- Parameters
- 
  
    | bottom | the minimal range limit accepted by the validator |  | top | the maximal range limit accepted by the validator |  | parent | parent object |  
 
Definition at line 48 of file qgsdoublevalidator.cpp.
 
 
◆ QgsDoubleValidator() [4/5]
      
        
          | QgsDoubleValidator::QgsDoubleValidator | ( | double | bottom, | 
        
          |  |  | double | top, | 
        
          |  |  | int | decimal, | 
        
          |  |  | QObject * | parent | 
        
          |  | ) |  |  | 
      
 
Constructor for QgsDoubleValidator. 
- Parameters
- 
  
    | 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 58 of file qgsdoublevalidator.cpp.
 
 
◆ QgsDoubleValidator() [5/5]
      
        
          | QgsDoubleValidator::QgsDoubleValidator | ( | int | decimal, | 
        
          |  |  | QObject * | parent | 
        
          |  | ) |  |  | 
      
 
 
◆ bottom()
  
  | 
        
          | double QgsDoubleValidator::bottom | ( |  | ) | const |  | inline | 
 
 
◆ setBottom()
  
  | 
        
          | void QgsDoubleValidator::setBottom | ( | double | bottom | ) |  |  | inline | 
 
 
◆ setRange()
  
  | 
        
          | virtual void QgsDoubleValidator::setRange | ( | double | bottom, |  
          |  |  | double | top |  
          |  | ) |  |  |  | inlinevirtual | 
 
 
◆ setTop()
  
  | 
        
          | void QgsDoubleValidator::setTop | ( | double | top | ) |  |  | inline | 
 
 
◆ toDouble() [1/2]
  
  | 
        
          | double QgsDoubleValidator::toDouble | ( | const QString & | input | ) |  |  | static | 
 
Converts input string to double value. 
It used locale interpretation first and C locale interpretation as fallback 
Definition at line 122 of file qgsdoublevalidator.cpp.
 
 
◆ toDouble() [2/2]
  
  | 
        
          | double QgsDoubleValidator::toDouble | ( | const QString & | input, |  
          |  |  | bool * | ok |  
          |  | ) |  |  |  | static | 
 
Converts input string to double value. 
It used locale interpretation first and C locale interpretation as fallback 
Definition at line 133 of file qgsdoublevalidator.cpp.
 
 
◆ top()
  
  | 
        
          | double QgsDoubleValidator::top | ( |  | ) | const |  | inline | 
 
 
◆ validate() [1/2]
      
        
          | 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 100 of file qgsdoublevalidator.cpp.
 
 
◆ validate() [2/2]
  
  | 
        
          | QValidator::State QgsDoubleValidator::validate | ( | QString & | input, |  
          |  |  | int & |  |  
          |  | ) |  | const |  | override | 
 
 
The documentation for this class was generated from the following files: