Potku  1.0.0
Class Documentation
 All Classes Namespaces Functions
Modules.InputValidator.InputValidator Class Reference

Inherits QDoubleValidator.

Public Member Functions

def __init__
 
def validate
 

Detailed Description

Validator to check the validity of user inputs.

Accepts double values with scientific notation (i.e. 0.232, 12.5e-12) and turns 
empty input to 0.0 and commas (,) to points (.).

Constructor & Destructor Documentation

def Modules.InputValidator.InputValidator.__init__ (   self,
  bottom = float_info.min,
  top = float_info.max,
  decimals = float_info.dig,
  parent = None 
)
Initiates the class.

Args:
    bottom: Float minimum value.
    top: Float maximum value.
    decimals: Integer representing decimals.
    parent: Parent object.

Member Function Documentation

def Modules.InputValidator.InputValidator.validate (   self,
  input_value,
  pos 
)
Validates the given input. Overrides the QDoubleValidator's validate 
function.

Args:
    input_value: User given string to be validated.
    pos: Cursor position (if required).

The documentation for this class was generated from the following file: