KDEUI
KIntSpinBox Class Reference
A QSpinBox with support for arbitrary base numbers. More...
#include <knuminput.h>

Public Member Functions | |
int | base () const |
KIntSpinBox (int lower, int upper, int singleStep, int value, QWidget *parent, int base=10) | |
KIntSpinBox (QWidget *parent=0) | |
void | setBase (int base) |
void | setEditFocus (bool mark) |
void | setSuffix (const KLocalizedString &suffix) |
virtual | ~KIntSpinBox () |
Protected Member Functions | |
virtual QString | textFromValue (int) const |
virtual int | valueFromText (const QString &text) const |
Properties | |
int | base |
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.
Definition at line 709 of file knuminput.h.
Constructor & Destructor Documentation
KIntSpinBox::KIntSpinBox | ( | QWidget * | parent = 0 |
) | [explicit] |
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 249 of file knuminput.cpp.
KIntSpinBox::KIntSpinBox | ( | 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.
Definition at line 261 of file knuminput.cpp.
KIntSpinBox::~KIntSpinBox | ( | ) | [virtual] |
Destructor.
Definition at line 256 of file knuminput.cpp.
Member Function Documentation
int KIntSpinBox::base | ( | ) | const |
- Returns:
- the base in which numbers in the spin box are represented.
void KIntSpinBox::setBase | ( | int | base | ) |
Sets the base in which the numbers in the spin box are represented.
Definition at line 270 of file knuminput.cpp.
void KIntSpinBox::setEditFocus | ( | bool | mark | ) |
sets focus and optionally marks all text
Definition at line 296 of file knuminput.cpp.
void KIntSpinBox::setSuffix | ( | const 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
Definition at line 304 of file knuminput.cpp.
QString KIntSpinBox::textFromValue | ( | int | v | ) | const [protected, virtual] |
Overloaded the method in QSpinBox to make use of the base given in the constructor.
Definition at line 281 of file knuminput.cpp.
int KIntSpinBox::valueFromText | ( | const QString & | text | ) | const [protected, virtual] |
Overloaded the method in QSpinBox to make use of the base given in the constructor.
Definition at line 286 of file knuminput.cpp.
Property Documentation
int KIntSpinBox::base [read, write] |
Definition at line 712 of file knuminput.h.
The documentation for this class was generated from the following files: