KDE 4.6 PyKDE API Reference

- KDE's Python API

# KIntSpinBox Class Reference

`from PyKDE4.kdeui import *`

Inherits: QSpinBox → QAbstractSpinBox → QWidget → QObject

## Detailed Description

A QSpinBox with support for arbitrary base numbers.

A QSpinBox with support for arbitrary base numbers (e.g. hexadecimal).

The class provides an easy interface to use other numeric systems than the decimal.

"KDE Integer Input Spinboxes with hexadecimal and binary input"

## Methods

| __init__ (self, QWidget parent=0)
| __init__ (self, int lower, int upper, int singleStep, int value, QWidget parent, int base=10)
| __init__ (self, KIntSpinBox a0)
int | base (self)
| setBase (self, int base)
| setEditFocus (self, bool mark)
| setSuffix (self, KLocalizedString suffix)
QString | textFromValue (self, int a0)
int | valueFromText (self, QString text)

## Method Documentation

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

Constructor.

Constructs a widget with an integer inputline with a little scrollbar and a slider, with minimal value 0, maximal value 99, step 1, base 10 and initial value 0.

__init__ | ( | self, |
|  | int | lower,
|  | int | upper,
|  | int | singleStep,
|  | int | value,
|  | QWidget | parent,
|  | int | base=10
| ) |  |  |

Constructor.

Constructs a widget with an integer inputline with a little scrollbar and a slider.

Parameters:

  | lower | The lowest valid value.
  | upper | The greatest valid value.
  | singleStep | The step size of the scrollbar.
  | value | The actual value.
  | base | The base of the used number system.
  | parent | The parent of the widget.

__init__ | ( | self, |
|  | KIntSpinBox | a0
| ) |  |  |

int base | ( |  | self ) |

Returns:
  the base in which numbers in the spin box are represented.

setBase | ( | self, |
|  | int | base
| ) |  |  |

Sets the base in which the numbers in the spin box are represented.

setEditFocus | ( | self, |
|  | bool | mark
| ) |  |  |

sets focus and optionally marks all text

setSuffix | ( | self, |
|  | KLocalizedString | suffix
| ) |  |  |

Sets the suffix to suffix. Use this to add a plural-aware suffix, e.g. by using ki18np("singular", "plural").

Since:
  4.3

QString textFromValue | ( | self, |
|  | int | a0
| ) |  |  |

Overloaded the method in QSpinBox to make use of the base given in the constructor.

int valueFromText | ( | self, |
|  | QString | text
| ) |  |  |

Overloaded the method in QSpinBox to make use of the base given in the constructor.