mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-10-31 00:06:02 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			151 lines
		
	
	
		
			4.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			151 lines
		
	
	
		
			4.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| /************************************************************************
 | |
|  * This file has been generated automatically from                      *
 | |
|  *                                                                      *
 | |
|  * src/gui/qgsdoublevalidator.h                                         *
 | |
|  *                                                                      *
 | |
|  * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 | |
|  ************************************************************************/
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| class QgsDoubleValidator : QRegularExpressionValidator
 | |
| {
 | |
| %Docstring(signature="appended")
 | |
| A custom validator which allows entry of doubles in a locale-tolerant
 | |
| way.
 | |
| 
 | |
| :py:class:`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.
 | |
| 
 | |
| .. versionadded:: 3.14
 | |
| %End
 | |
| 
 | |
| %TypeHeaderCode
 | |
| #include "qgsdoublevalidator.h"
 | |
| %End
 | |
|   public:
 | |
|     explicit QgsDoubleValidator( QObject *parent );
 | |
| %Docstring
 | |
| Constructor for QgsDoubleValidator.
 | |
| %End
 | |
| 
 | |
|     QgsDoubleValidator( const QRegularExpression &expression, double bottom, double top, QObject *parent );
 | |
| %Docstring
 | |
| Constructor for QgsDoubleValidator.
 | |
| 
 | |
| :param bottom: the minimal range limit accepted by the validator
 | |
| :param top: the maximal range limit accepted by the validator
 | |
| :param parent: parent object
 | |
| :param expression: custom regular expression
 | |
| %End
 | |
| 
 | |
|     QgsDoubleValidator( double bottom, double top, QObject *parent );
 | |
| %Docstring
 | |
| Constructor for QgsDoubleValidator.
 | |
| 
 | |
| :param bottom: the minimal range limit accepted by the validator
 | |
| :param top: the maximal range limit accepted by the validator
 | |
| :param parent: parent object
 | |
| %End
 | |
| 
 | |
|     QgsDoubleValidator( double bottom, double top, int decimal, QObject *parent );
 | |
| %Docstring
 | |
| Constructor for QgsDoubleValidator.
 | |
| 
 | |
| :param bottom: the minimal range limit accepted by the validator
 | |
| :param top: the maximal range limit accepted by the validator
 | |
| :param decimal: the number of decimals accepted by the validator
 | |
| :param parent: parent object
 | |
| %End
 | |
| 
 | |
|     QgsDoubleValidator( int decimal, QObject *parent );
 | |
| %Docstring
 | |
| Constructor for QgsDoubleValidator.
 | |
| 
 | |
| :param decimal: the number of decimals accepted by the validator
 | |
| :param parent: parent object
 | |
| 
 | |
| .. versionadded:: 3.16
 | |
| %End
 | |
| 
 | |
|     void setMaxDecimals( int maxDecimals );
 | |
| %Docstring
 | |
| Sets the number of decimals accepted by the validator to
 | |
| ``maxDecimals``.
 | |
| 
 | |
| .. warning::
 | |
| 
 | |
|    setting decimals overrides any custom regular expression that was previously set
 | |
| 
 | |
| .. versionadded:: 3.22
 | |
| %End
 | |
| 
 | |
| 
 | |
| 
 | |
|     QValidator::State validate( QString &input ) const;
 | |
| %Docstring
 | |
| Evaluates ``input`` string validity according to QRegularExpression and
 | |
| ability to be converted in double value.
 | |
| %End
 | |
| 
 | |
| 
 | |
|     static double toDouble( const QString &input );
 | |
| %Docstring
 | |
| Converts ``input`` string to double value. It uses locale interpretation
 | |
| first and C locale interpretation as fallback
 | |
| %End
 | |
| 
 | |
|     void setBottom( double bottom );
 | |
| %Docstring
 | |
| Set top range limit
 | |
| 
 | |
| .. seealso:: :py:func:`setTop`
 | |
| 
 | |
| .. seealso:: :py:func:`setRange`
 | |
| %End
 | |
| 
 | |
|     void setTop( double top );
 | |
| %Docstring
 | |
| Set top range limit
 | |
| 
 | |
| .. seealso:: :py:func:`setBottom`
 | |
| 
 | |
| .. seealso:: :py:func:`setRange`
 | |
| %End
 | |
| 
 | |
|     virtual void setRange( double bottom, double top );
 | |
| %Docstring
 | |
| Set bottom and top range limits
 | |
| 
 | |
| .. seealso:: :py:func:`setBottom`
 | |
| 
 | |
| .. seealso:: :py:func:`setTop`
 | |
| %End
 | |
| 
 | |
|     double bottom() const;
 | |
| %Docstring
 | |
| Returns top range limit
 | |
| 
 | |
| .. seealso:: :py:func:`setBottom`
 | |
| %End
 | |
| 
 | |
|     double top() const;
 | |
| %Docstring
 | |
| Returns top range limit
 | |
| 
 | |
| .. seealso:: :py:func:`setTop`
 | |
| %End
 | |
| 
 | |
| };
 | |
| 
 | |
| /************************************************************************
 | |
|  * This file has been generated automatically from                      *
 | |
|  *                                                                      *
 | |
|  * src/gui/qgsdoublevalidator.h                                         *
 | |
|  *                                                                      *
 | |
|  * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 | |
|  ************************************************************************/
 |