.TH "KIntNumInput" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdeui Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KIntNumInput \- An input widget for integer numbers, consisting of a spinbox and a slider.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <knuminput.h>\fP
.PP
Inherits \fBKNumInput\fP.
.PP
.SS "Public Slots"

.in +1c
.ti -1c
.RI "void \fBsetValue\fP (int)"
.br
.ti -1c
.RI "void \fBsetRelativeValue\fP (double)"
.br
.ti -1c
.RI "void \fBsetReferencePoint\fP (int)"
.br
.ti -1c
.RI "void \fBsetSuffix\fP (const \fBQString\fP &suffix)"
.br
.ti -1c
.RI "void \fBsetPrefix\fP (const \fBQString\fP &prefix)"
.br
.ti -1c
.RI "void \fBsetEditFocus\fP (bool mark=true)"
.br
.in -1c
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBvalueChanged\fP (int)"
.br
.ti -1c
.RI "void \fBrelativeValueChanged\fP (double)"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKIntNumInput\fP (\fBQWidget\fP *parent=0, const char *name=0)"
.br
.ti -1c
.RI "\fBKIntNumInput\fP (int value, \fBQWidget\fP *parent=0, int base=10, const char *name=0)"
.br
.ti -1c
.RI "\fBKIntNumInput\fP (\fBKNumInput\fP *below, int value, \fBQWidget\fP *parent=0, int base=10, const char *name=0)"
.br
.ti -1c
.RI "virtual \fB~KIntNumInput\fP ()"
.br
.ti -1c
.RI "int \fBvalue\fP () const "
.br
.ti -1c
.RI "double \fBrelativeValue\fP () const "
.br
.ti -1c
.RI "int \fBreferencePoint\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBsuffix\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBprefix\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBspecialValueText\fP () const "
.br
.ti -1c
.RI "void \fBsetRange\fP (int min, int max, int step=1, bool slider=true)"
.br
.ti -1c
.RI "void \fBsetMinValue\fP (int min)"
.br
.ti -1c
.RI "int \fBminValue\fP () const "
.br
.ti -1c
.RI "void \fBsetMaxValue\fP (int max)"
.br
.ti -1c
.RI "int \fBmaxValue\fP () const "
.br
.ti -1c
.RI "void \fBsetSpecialValueText\fP (const \fBQString\fP &text)"
.br
.ti -1c
.RI "virtual void \fBsetLabel\fP (const \fBQString\fP &label, int a=AlignLeft|AlignTop)"
.br
.ti -1c
.RI "virtual \fBQSize\fP \fBminimumSizeHint\fP () const "
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBdoLayout\fP ()"
.br
.ti -1c
.RI "void \fBresizeEvent\fP (\fBQResizeEvent\fP *)"
.br
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "\fBKIntSpinBox\fP * \fBm_spin\fP"
.br
.ti -1c
.RI "\fBQSize\fP \fBm_sizeSpin\fP"
.br
.in -1c
.SS "Properties"

.in +1c
.ti -1c
.RI "int \fBvalue\fP"
.br
.ti -1c
.RI "int \fBminValue\fP"
.br
.ti -1c
.RI "int \fBmaxValue\fP"
.br
.ti -1c
.RI "int \fBreferencePoint\fP"
.br
.ti -1c
.RI "double \fBrelativeValue\fP"
.br
.ti -1c
.RI "\fBQString\fP \fBsuffix\fP"
.br
.ti -1c
.RI "\fBQString\fP \fBprefix\fP"
.br
.ti -1c
.RI "\fBQString\fP \fBspecialValueText\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
An input widget for integer numbers, consisting of a spinbox and a slider. 

KIntNumInput combines a \fBQSpinBox\fP and optionally a \fBQSlider\fP 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.
.PP
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'.
.PP
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 \fBQSpinBox\fP (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.
.PP
It uses \fBKIntValidator\fP validator class. KIntNumInput enforces the value to be in the given range, and can display it in any base between 2 and 36.
.PP
KDE Int Number Input Spinbox 
.PP
\fBVersion:\fP
.RS 4
$Id$ 
.RE
.PP

.PP
Definition at line 187 of file knuminput.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KIntNumInput::KIntNumInput (\fBQWidget\fP * parent = \fC0\fP, const char * name = \fC0\fP)"
.PP
Constructs an input control for integer values with base 10 and initial value 0. 
.PP
Definition at line 273 of file knuminput.cpp.
.SS "KIntNumInput::KIntNumInput (int value, \fBQWidget\fP * parent = \fC0\fP, int base = \fC10\fP, const char * name = \fC0\fP)"
.PP
Constructor It constructs a \fBQSpinBox\fP that allows the input of integer numbers in the range of -INT_MAX to +INT_MAX. 
.PP
To set a descriptive label, use \fBsetLabel()\fP. To enforce the value being in a range and optionally to attach a slider to it, use \fBsetRange()\fP.
.PP
\fBParameters:\fP
.RS 4
\fIvalue\fP initial value for the control 
.br
\fIbase\fP numeric base used for display 
.br
\fIparent\fP parent \fBQWidget\fP 
.br
\fIname\fP internal name for this widget 
.RE
.PP

.PP
Definition at line 279 of file knuminput.cpp.
.SS "KIntNumInput::KIntNumInput (\fBKNumInput\fP * below, int value, \fBQWidget\fP * parent = \fC0\fP, int base = \fC10\fP, const char * name = \fC0\fP)"
.PP
Constructor. 
.PP
the difference to the one above is the 'below' parameter. It tells this instance that it is visually put below some other \fBKNumInput\fP 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).
.PP
\fBParameters:\fP
.RS 4
\fIbelow\fP append KIntNumInput to the \fBKNumInput\fP chain 
.br
\fIvalue\fP initial value for the control 
.br
\fIbase\fP numeric base used for display 
.br
\fIparent\fP parent \fBQWidget\fP 
.br
\fIname\fP internal name for this widget 
.RE
.PP

.PP
Definition at line 266 of file knuminput.cpp.
.SS "KIntNumInput::~\fBKIntNumInput\fP ()\fC [virtual]\fP"
.PP
Destructor. 
.PP
Definition at line 484 of file knuminput.cpp.
.SH "Member Function Documentation"
.PP 
.SS "int KIntNumInput::value () const"
.PP
\fBReturns:\fP
.RS 4
the current value. 
.RE
.PP

.SS "double KIntNumInput::relativeValue () const"
.PP
\fBReturns:\fP
.RS 4
the curent value in units of the referencePoint. 
.RE
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.SS "int KIntNumInput::referencePoint () const"
.PP
\fBReturns:\fP
.RS 4
the current reference point 
.RE
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Referenced by setRange().
.SS "\fBQString\fP KIntNumInput::suffix () const"
.PP
\fBReturns:\fP
.RS 4
the suffix displayed behind the value. 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetSuffix()\fP 
.RE
.PP

.SS "\fBQString\fP KIntNumInput::prefix () const"
.PP
\fBReturns:\fP
.RS 4
the prefix displayed in front of the value. 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetPrefix()\fP 
.RE
.PP

.SS "\fBQString\fP KIntNumInput::specialValueText () const"
.PP
\fBReturns:\fP
.RS 4
the string displayed for a special value. 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetSpecialValueText()\fP 
.RE
.PP

.SS "void KIntNumInput::setRange (int min, int max, int step = \fC1\fP, bool slider = \fCtrue\fP)"
.PP
\fBParameters:\fP
.RS 4
\fImin\fP minimum value 
.br
\fImax\fP maximum value 
.br
\fIstep\fP step size for the \fBQSlider\fP 
.br
\fIslider\fP whether the slider is created or not 
.RE
.PP

.PP
Definition at line 327 of file knuminput.cpp.
.PP
References QWidget::layout(), QSpinBox::lineStep(), referencePoint(), QSpinBox::setLineStep(), QSpinBox::setMaxValue(), QSpinBox::setMinValue(), QSlider::setRange(), setReferencePoint(), QSlider::setTickInterval(), QSlider::setTickmarks(), setValue(), QSpinBox::value(), and valueChanged().
.PP
Referenced by setMaxValue(), and setMinValue().
.SS "void KIntNumInput::setMinValue (int min)"
.PP
Sets the minimum value. 
.PP
Definition at line 366 of file knuminput.cpp.
.PP
References QSpinBox::lineStep(), QSpinBox::maxValue(), and setRange().
.PP
Referenced by KFontChooser::KFontChooser().
.SS "int KIntNumInput::minValue () const"
.PP
\fBReturns:\fP
.RS 4
the minimum value. 
.RE
.PP

.PP
Referenced by setReferencePoint().
.SS "void KIntNumInput::setMaxValue (int max)"
.PP
Sets the maximum value. 
.PP
Definition at line 376 of file knuminput.cpp.
.PP
References QSpinBox::lineStep(), QSpinBox::minValue(), and setRange().
.SS "int KIntNumInput::maxValue () const"
.PP
\fBReturns:\fP
.RS 4
the maximum value. 
.RE
.PP

.PP
Referenced by setReferencePoint().
.SS "void KIntNumInput::setSpecialValueText (const \fBQString\fP & text)"
.PP
Sets the special value text. 
.PP
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. 
.PP
Definition at line 512 of file knuminput.cpp.
.PP
References QWidget::layout(), and QSpinBox::setSpecialValueText().
.SS "void KIntNumInput::setLabel (const \fBQString\fP & label, int a = \fCAlignLeft|AlignTop\fP)\fC [virtual]\fP"
.PP
Sets the text and alignment of the main description label. 
.PP
\fBParameters:\fP
.RS 4
\fIlabel\fP The text of the label. Use QString::null to remove an existing one.
.br
\fIa\fP one of \fCAlignLeft\fP, \fCAlignHCenter\fP, YAlignRight and \fCAlignTop\fP, \fCAlignVCenter\fP, \fCAlignBottom\fP. default is \fCAlignLeft\fP | \fCAlignTop\fP.
.RE
.PP
The vertical alignment flags have special meaning with this widget:
.PP
.PD 0
.IP "\(bu" 2
\fCAlignTop\fP The label is placed above the edit/slider 
.IP "\(bu" 2
\fCAlignVCenter\fP The label is placed left beside the edit 
.IP "\(bu" 2
\fCAlignBottom\fP The label is placed below the edit/slider 
.PP

.PP
Reimplemented from \fBKNumInput\fP.
.PP
Definition at line 523 of file knuminput.cpp.
.PP
References QLabel::setBuddy(), and KNumInput::setLabel().
.SS "\fBQSize\fP KIntNumInput::minimumSizeHint () const\fC [virtual]\fP"
.PP
This method returns the minimum size necessary to display the control. 
.PP
The minimum size is enough to show all the labels in the current font (font change may invalidate the return value).
.PP
\fBReturns:\fP
.RS 4
the minimum size necessary to show the control 
.RE
.PP

.PP
Reimplemented from \fBQWidget\fP.
.PP
Definition at line 415 of file knuminput.cpp.
.PP
References QWidget::constPolish(), QSize::height(), and QSize::width().
.SS "void KIntNumInput::setValue (int)\fC [slot]\fP"
.PP
Sets the value of the control. 
.PP
Definition at line 489 of file knuminput.cpp.
.PP
References QSpinBox::setValue().
.PP
Referenced by setRange(), and setRelativeValue().
.SS "void KIntNumInput::setRelativeValue (double)\fC [slot]\fP"
.PP
Sets the value in units of the referencePoint 
.PP
\fBSince:\fP
.RS 4
3.1. 
.RE
.PP

.PP
Definition at line 495 of file knuminput.cpp.
.PP
References setValue().
.SS "void KIntNumInput::setReferencePoint (int)\fC [slot]\fP"
.PP
Sets the reference point for relativeValue. 
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 304 of file knuminput.cpp.
.PP
References maxValue(), and minValue().
.PP
Referenced by setRange().
.SS "void KIntNumInput::setSuffix (const \fBQString\fP & suffix)\fC [slot]\fP"
.PP
Sets the suffix to \fCsuffix\fP. 
.PP
Use QString::null to disable this feature. Formatting has to be provided (e.g. a space separator between the prepended \fCvalue\fP and the suffix's text has to be provided as the first character in the suffix).
.PP
\fBSee also:\fP
.RS 4
\fBQSpinBox::setSuffix()\fP, \fBsetPrefix()\fP 
.RE
.PP

.PP
Definition at line 386 of file knuminput.cpp.
.PP
References QWidget::layout(), and QSpinBox::setSuffix().
.SS "void KIntNumInput::setPrefix (const \fBQString\fP & prefix)\fC [slot]\fP"
.PP
Sets the prefix to \fCprefix\fP. 
.PP
Use QString::null to disable this feature. Formatting has to be provided (see above).
.PP
\fBSee also:\fP
.RS 4
\fBQSpinBox::setPrefix()\fP, \fBsetSuffix()\fP 
.RE
.PP

.PP
Definition at line 398 of file knuminput.cpp.
.PP
References QWidget::layout(), and QSpinBox::setPrefix().
.SS "void KIntNumInput::setEditFocus (bool mark = \fCtrue\fP)\fC [slot]\fP"
.PP
sets focus to the edit widget and marks all text in if mark == true 
.PP
Definition at line 410 of file knuminput.cpp.
.PP
References KIntSpinBox::setEditFocus().
.SS "void KIntNumInput::valueChanged (int)\fC [signal]\fP"
.PP
Emitted every time the value changes (by calling \fBsetValue()\fP or by user interaction). 
.PP
Referenced by setRange().
.SS "void KIntNumInput::relativeValueChanged (double)\fC [signal]\fP"
.PP
Emitted whenever valueChanged is. 
.PP
Contains the change relative to the referencePoint. 
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.SS "void KIntNumInput::doLayout ()\fC [protected, virtual]\fP"
.PP
You need to overwrite this method and implement your layout calculations there. 
.PP
See \fBKIntNumInput::doLayout\fP and \fBKDoubleNumInput::doLayout\fP implementation for details. 
.PP
Implements \fBKNumInput\fP.
.PP
Definition at line 440 of file knuminput.cpp.
.PP
References QLabel::setBuddy(), and QSize::width().

.SH "Author"
.PP 
Generated automatically by Doxygen for kdeui Library from the source code.
