org.kde.koala

Class KIntNumInput

public class KIntNumInput extends KNumInput

KIntNumInput combines a QSpinBox and optionally a QSlider with a label to make an easy to use control for setting some integer parameter. This is especially nice for configuration dialogs, which can have many such combinated controls. The slider is created only when the user specifies a range for the control using the setRange function with the slider parameter set to "true". A special feature of KIntNumInput, designed specifically for the situation when there are several KIntNumInputs in a column, is that you can specify what portion of the control is taken by the QSpinBox (the remaining portion is used by the slider). This makes it very simple to have all the sliders in a column be the same size. It uses KIntValidator validator class. KIntNumInput enforces the value to be in the given range, and can display it in any base between 2 and 36. \image html kintnuminput.png "KDE Int Number Input Spinbox" See KIntNumInputSignals for signals emitted by KIntNumInput

Version: $Id: KIntNumInput.java 473384 2005-10-23 14:17:09Z rdale $

UNKNOWN: An input widget for integer numbers, consisting of a spinbox and a slider.

Constructor Summary
protected KIntNumInput(Class dummy)
KIntNumInput(QWidget parent, String name)
Constructs an input control for integer values with base 10 and initial value 0.
KIntNumInput(QWidget parent)
KIntNumInput()
KIntNumInput(int value, QWidget parent, int base, String name)
Constructor It constructs a QSpinBox that allows the input of integer numbers in the range of -INT_MAX to +INT_MAX.
KIntNumInput(int value, QWidget parent, int base)
KIntNumInput(int value, QWidget parent)
KIntNumInput(int value)
KIntNumInput(KNumInput below, int value, QWidget parent, int base, String name)
Constructor the difference to the one above is the "below" parameter.
KIntNumInput(KNumInput below, int value, QWidget parent, int base)
KIntNumInput(KNumInput below, int value, QWidget parent)
KIntNumInput(KNumInput below, int value)
Method Summary
StringclassName()
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
protected voiddoLayout()
protected voidfinalize()
Deletes the wrapped C++ instance
booleanisDisposed()
Has the wrapped C++ instance been deleted?
intmaxValue()
QMetaObjectmetaObject()
QSizeminimumSizeHint()
This method returns the minimum size necessary to display the control.
intminValue()
Stringprefix()
intreferencePoint()
doublerelativeValue()
protected voidresizeEvent(QResizeEvent arg1)
voidsetEditFocus(boolean mark)
sets focus to the edit widget and marks all text in if mark == true
voidsetEditFocus()
voidsetLabel(String label, int a)
voidsetLabel(String label)
voidsetMaxValue(int max)
Sets the maximum value.
voidsetMinValue(int min)
Sets the minimum value.
voidsetPrefix(String prefix)
Sets the prefix to prefix. Use null to disable this feature.
voidsetRange(int min, int max, int step, boolean slider)
voidsetRange(int min, int max, int step)
voidsetRange(int min, int max)
voidsetReferencePoint(int arg1)
Sets the reference point for relativeValue.
voidsetRelativeValue(double arg1)
Sets the value in units of the referencePoint
voidsetSpecialValueText(String text)
Sets the special value text.
voidsetSuffix(String suffix)
Sets the suffix to suffix. Use null to disable this feature.
voidsetValue(int arg1)
Sets the value of the control.
StringspecialValueText()
Stringsuffix()
intvalue()

Constructor Detail

KIntNumInput

protected KIntNumInput(Class dummy)

KIntNumInput

public KIntNumInput(QWidget parent, String name)
Constructs an input control for integer values with base 10 and initial value 0.

UNKNOWN: Constructs an input control for integer values with base 10 and initial value 0.

KIntNumInput

public KIntNumInput(QWidget parent)

KIntNumInput

public KIntNumInput()

KIntNumInput

public KIntNumInput(int value, QWidget parent, int base, String name)
Constructor It constructs a QSpinBox that allows the input of integer numbers in the range of -INT_MAX to +INT_MAX. To set a descriptive label, use setLabel(). To enforce the value being in a range and optionally to attach a slider to it, use setRange().

Parameters: value initial value for the control base numeric base used for display parent parent QWidget name internal name for this widget

UNKNOWN: Constructor It constructs a QSpinBox that allows the input of integer numbers in the range of -INT_MAX to +INT_MAX.

KIntNumInput

public KIntNumInput(int value, QWidget parent, int base)

KIntNumInput

public KIntNumInput(int value, QWidget parent)

KIntNumInput

public KIntNumInput(int value)

KIntNumInput

public KIntNumInput(KNumInput below, int value, QWidget parent, int base, String name)
Constructor the difference to the one above is the "below" parameter. It tells this instance that it is visually put below some other KNumInput widget. Note that these two KNumInput's need not to have the same parent widget or be in the same layout group. The effect is that it'll adjust it's layout in correspondence with the layout of the other KNumInput's (you can build an arbitrary long chain).

Parameters: below append KIntNumInput to the KNumInput chain value initial value for the control base numeric base used for display parent parent QWidget name internal name for this widget

UNKNOWN: Constructor

KIntNumInput

public KIntNumInput(KNumInput below, int value, QWidget parent, int base)

KIntNumInput

public KIntNumInput(KNumInput below, int value, QWidget parent)

KIntNumInput

public KIntNumInput(KNumInput below, int value)

Method Detail

className

public String className()

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()

doLayout

protected void doLayout()

finalize

protected void finalize()
Deletes the wrapped C++ instance

isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?

maxValue

public int maxValue()

Returns: the maximum value.

UNKNOWN:

metaObject

public QMetaObject metaObject()

minimumSizeHint

public QSize minimumSizeHint()
This method returns the minimum size necessary to display the control. The minimum size is enough to show all the labels in the current font (font change may invalidate the return value).

Returns: the minimum size necessary to show the control

UNKNOWN: This method returns the minimum size necessary to display the control.

minValue

public int minValue()

Returns: the minimum value.

UNKNOWN:

prefix

public String prefix()

Returns: the prefix displayed in front of the value.

See Also: KIntNumInput

UNKNOWN:

referencePoint

public int referencePoint()

Returns: the current reference point

UNKNOWN:

relativeValue

public double relativeValue()

Returns: the curent value in units of the referencePoint.

UNKNOWN:

resizeEvent

protected void resizeEvent(QResizeEvent arg1)

setEditFocus

public void setEditFocus(boolean mark)
sets focus to the edit widget and marks all text in if mark == true

UNKNOWN: sets focus to the edit widget and marks all text in if mark == true

setEditFocus

public void setEditFocus()

setLabel

public void setLabel(String label, int a)

setLabel

public void setLabel(String label)

setMaxValue

public void setMaxValue(int max)
Sets the maximum value.

UNKNOWN: Sets the maximum value.

setMinValue

public void setMinValue(int min)
Sets the minimum value.

UNKNOWN: Sets the minimum value.

setPrefix

public void setPrefix(String prefix)
Sets the prefix to prefix. Use null to disable this feature. Formatting has to be provided (see above).

See Also: org.kde.qt.QSpinBox#setPrefix KIntNumInput

UNKNOWN: Sets the prefix to prefix.

setRange

public void setRange(int min, int max, int step, boolean slider)

Parameters: min minimum value max maximum value step step size for the QSlider slider whether the slider is created or not

UNKNOWN:

setRange

public void setRange(int min, int max, int step)

setRange

public void setRange(int min, int max)

setReferencePoint

public void setReferencePoint(int arg1)
Sets the reference point for relativeValue.

UNKNOWN: Sets the reference point for relativeValue.

setRelativeValue

public void setRelativeValue(double arg1)
Sets the value in units of the referencePoint

UNKNOWN: Sets the value in units of the referencePoint

setSpecialValueText

public void setSpecialValueText(String text)
Sets the special value text. If set, the SpinBox will display this text instead of the numeric value whenever the current value is equal to minVal(). Typically this is used for indicating that the choice has a special (default) meaning.

UNKNOWN: Sets the special value text.

setSuffix

public void setSuffix(String suffix)
Sets the suffix to suffix. Use null to disable this feature. Formatting has to be provided (e.g. a space separator between the prepended value and the suffix's text has to be provided as the first character in the suffix).

See Also: org.kde.qt.QSpinBox#setSuffix KIntNumInput

UNKNOWN: Sets the suffix to suffix.

setValue

public void setValue(int arg1)
Sets the value of the control.

UNKNOWN: Sets the value of the control.

specialValueText

public String specialValueText()

Returns: the string displayed for a special value.

See Also: KIntNumInput

UNKNOWN:

suffix

public String suffix()

Returns: the suffix displayed behind the value.

See Also: KIntNumInput

UNKNOWN:

value

public int value()

Returns: the current value.

UNKNOWN: