# class KIntValidator

###

Module | kdeui
Namespace |
Class | KIntValidator
Inherits | QValidator

QValidator for integers.

This can be used by QLineEdit or subclass to provide validated text entry. Can be provided with a base value (default is 10), to allow the proper entry of hexadecimal, octal, or any other base numeric data.

Author Glen Parker <glenebob@nwlink.com> Version: 0.0.1

### methods

- KIntValidator (parent, base)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  parent | QWidget |
  base | int | 10

  Constuctor. Also sets the base value.

- KIntValidator (bottom, top, parent, base)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  bottom | int |
  top | int |
  parent | QWidget |
  base | int | 10

  Constructor. Also sets the minimum, maximum, and numeric base values.

- KIntValidator (a0, a1)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | QWidget |
  a1 | int | 10

- base ( )

  returns int

  Returns the current numeric base.

- bottom ( )

  returns int

  Returns the current minimum value allowed.

- fixup (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | QString |

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

- setBase (base)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  base | int |

  Sets the numeric base value. base must be between 2 and 36.

- setRange (bottom, top)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  bottom | int |
  top | int |

  Sets the minimum and maximum values allowed. If top is greater than bottom, it is set to the value of bottom.

- top ( )

  returns int

  Returns the current maximum value allowed.

- validate (a0, a1)

  returns QValidator.State

  Argument | Type | Default
  --- | --- | ---
  a0 | QString |
  a1 | int |

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