# kdeui Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# KIntSpinBox Class Reference

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

`#include <knuminput.h>`

Inheritance diagram for KIntSpinBox:

[legend]
Collaboration diagram for KIntSpinBox:

[legend]
List of all members.

## Public Member Functions

| KIntSpinBox (QWidget *parent=0, const char *name=0)
| Constructor.
| KIntSpinBox (int lower, int upper, int step, int value, int base=10, QWidget *parent=0, const char *name=0)
| Constructor.
virtual | ~KIntSpinBox ()
| Destructor.
void | setBase (int base)
| Sets the base in which the numbers in the spin box are represented.
int | base () const
void | setEditFocus (bool mark)
| sets focus and optionally marks all text

## Protected Member Functions

virtual QString | mapValueToText (int)
| Overloaded the method in QSpinBox to make use of the base given in the constructor.
virtual int | mapTextToValue (bool *)
| Overloaded the method in QSpinBox to make use of the base given in the constructor.
virtual void | virtual_hook (int id, void *data)

## Detailed Description

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

hexadecimal).

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

Definition at line 708 of file knuminput.h.

## Constructor & Destructor Documentation

KIntSpinBox::KIntSpinBox | ( | QWidget * | parent = 0,
|  | const char * | name = 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. Definition at line 202 of file knuminput.cpp. References QSpinBox::editor(), KStdAccel::name(), and QSpinBox::setValue().

KIntSpinBox::KIntSpinBox | ( | int | lower,
|  | int | upper,
|  | int | step,
|  | int | value,
|  | int | base = 10,
|  | QWidget * | parent = 0,
|  | const char * | name = 0
| ) |

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.
  step | The step size of the scrollbar.
  value | The actual value.
  base | The base of the used number system.
  parent | The parent of the widget.
  name | The Name of the widget.

Definition at line 214 of file knuminput.cpp.

References QSpinBox::editor(), KStdAccel::name(), and QSpinBox::setValue().

KIntSpinBox::~KIntSpinBox | ( |  | ) | `[virtual]`

| Destructor. Definition at line 210 of file knuminput.cpp.

## Member Function Documentation

void KIntSpinBox::setBase | ( | int | base | ) |

| Sets the base in which the numbers in the spin box are represented. Definition at line 223 of file knuminput.cpp.

int KIntSpinBox::base | ( |  | ) | const

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

Definition at line 229 of file knuminput.cpp.

void KIntSpinBox::setEditFocus | ( | bool | mark | ) |

| sets focus and optionally marks all text Definition at line 244 of file knuminput.cpp. References QSpinBox::editor(). Referenced by KIntNumInput::setEditFocus().

QString KIntSpinBox::mapValueToText | ( | int |  | ) | `[protected, virtual]`

| Overloaded the method in QSpinBox to make use of the base given in the constructor. Reimplemented from QSpinBox. Definition at line 234 of file knuminput.cpp. References QString::number().

int KIntSpinBox::mapTextToValue | ( | bool * |  | ) | `[protected, virtual]`

| Overloaded the method in QSpinBox to make use of the base given in the constructor. Reimplemented from QSpinBox. Definition at line 239 of file knuminput.cpp. References QSpinBox::cleanText().

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

- knuminput.h
- knuminput.cpp

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:01:16 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001