|
Share and Money Management 0.18devel
|
Validator to check for valid decimal. More...
Public Member Functions | |
| def | __init__ (self, empty=True) |
| Constructor. More... | |
| def | Clone (self) |
| Standard cloner. More... | |
| def | Validate (self, unused) |
| Validate the contents of the given text control. More... | |
| def | OnChar (self, event) |
| Check key events for valid characters. More... | |
Public Member Functions inherited from gui.controls.BaseValidator | |
| def | __init__ (self) |
| Constructor. More... | |
| def | Clone (self) |
| Standard cloner. More... | |
| def | Validate (self, unused) |
| Validate the contents of the given control. More... | |
| def | TransferToWindow (self) |
| Transfer data from validator to window. More... | |
| def | TransferFromWindow (self) |
| Transfer data from window to validator. More... | |
Public Attributes | |
| empty | |
Allow empty widget (True) or not (False) More... | |
Static Public Attributes | |
| string | validCharacters = "1234567890," |
| Set of valid characters. More... | |
| RE_DecimalPattern = re.compile("\d+,??\d*$") | |
| Compiled regular expression to match decimal values. More... | |
Validator to check for valid decimal.
The key events will be checked for valid characters as well as the whole input is checked for valid decimal using a regular expression.
| def gui.controls.DecimalValidator.__init__ | ( | self, | |
empty = True |
|||
| ) |
Constructor.
| self | The object instance itself |
| empty | Check for empty widgets (see empty) |
Reimplemented from gui.controls.BaseValidator.
| def gui.controls.DecimalValidator.Clone | ( | self | ) |
Standard cloner.
Reimplemented from gui.controls.BaseValidator.
References gui.controls.DecimalValidator.empty.
| def gui.controls.DecimalValidator.OnChar | ( | self, | |
| event | |||
| ) |
Check key events for valid characters.
References gui.controls.DecimalValidator.validCharacters.
| def gui.controls.DecimalValidator.Validate | ( | self, | |
| unused | |||
| ) |
Validate the contents of the given text control.
Reimplemented from gui.controls.BaseValidator.
References gui.controls.DecimalValidator.empty, and gui.controls.DecimalValidator.RE_DecimalPattern.
| gui.controls.DecimalValidator.empty |
Allow empty widget (True) or not (False)
Referenced by gui.controls.DecimalValidator.Clone(), and gui.controls.DecimalValidator.Validate().
|
static |
Compiled regular expression to match decimal values.
A comma will be used as decimal point.
Referenced by gui.controls.DecimalValidator.Validate().
|
static |
Set of valid characters.
Referenced by gui.controls.DecimalValidator.OnChar().