KDE 4.5 PyKDE API Reference

- KDE's Python API

# KFloatValidator Class Reference

`from PyKDE4.kdeui import *`

Inherits: QValidator → QObject

## Detailed Description

QValidator for floating point entry (Obsolete)

Obsolete:
  Use KDoubleValidator

Extends the QValidator class to properly validate double numeric data. This can be used by QLineEdit or subclass to provide validated text entry.

Author:
  Glen Parker <glenebob@nwlink.com>

Version: 0.0.1

## Methods
| __init__ (self, QWidget parent)
| __init__ (self, float bottom, float top, QWidget parent)
| __init__ (self, float bottom, float top, bool localeAware, QWidget parent)
bool | acceptLocalizedNumbers (self)
float | bottom (self)
| fixup (self, QString a0)
| setAcceptLocalizedNumbers (self, bool b)
| setRange (self, float bottom, float top)
float | top (self)
QValidator.State | validate (self, QString a0, int a1)

## Method Documentation

__init__ | ( | self, |
|  | QWidget | parent
| ) |  |  |

Constructor.

__init__ | ( | self, |
|  | float | bottom,
|  | float | top,
|  | QWidget | parent
| ) |  |  |

Constructor. Also sets the minimum and maximum values.

__init__ | ( | self, |
|  | float | bottom,
|  | float | top,
|  | bool | localeAware,
|  | QWidget | parent
| ) |  |  |

Constructor. Sets the validator to be locale aware if localeAware is true.

bool acceptLocalizedNumbers | ( |  | self ) |

Returns true if the validator is locale aware.

See also:
  setAcceptLocalizedNumbers().

float bottom | ( |  | self ) |

Returns the current minimum value allowed.

fixup | ( | self, |
|  | QString | a0
| ) |  |  |

Fixes the text if possible, providing a valid string. The parameter may be modified.

setAcceptLocalizedNumbers | ( | self, |
|  | bool | b
| ) |  |  |

Sets the validator to be locale aware if is true. In this case, the character KLocale.decimalSymbol() from the global locale is recognized as decimal separator.

setRange | ( | self, |
|  | float | bottom,
|  | float | top
| ) |  |  |

Sets the minimum and maximum value allowed.

float top | ( |  | self ) |

Returns the current maximum value allowed.

QValidator.State validate | ( | self, |
|  | QString | a0,
|  | int | a1
| ) |  |  |

Validates the text, and return the result. Does not modify the parameters.