.TH "KNumInput" 3 "28 Jan 2004" "kdeui Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KNumInput \- You need to inherit from this class if you want to implement K*NumInput for a different variable type.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <knuminput.h>\fP
.PP
Inherits \fBQWidget\fP.
.PP
Inherited by \fBKDoubleNumInput\fP, and \fBKIntNumInput\fP.
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKNumInput\fP (\fBQWidget\fP *parent=0, const  char *name=0)"
.br
.RI "\fIDefault constructor. \fP"
.ti -1c
.RI "\fBKNumInput\fP (\fBKNumInput\fP *below, \fBQWidget\fP *parent=0, const  char *name=0)"
.br
.ti -1c
.RI "virtual void \fBsetLabel\fP (const  \fBQString\fP &label, int a=AlignLeft|AlignTop)"
.br
.RI "\fISets the text and alignment of the main description label. \fP"
.ti -1c
.RI "\fBQString\fP \fBlabel\fP () const "
.br
.ti -1c
.RI "bool \fBshowSlider\fP () const "
.br
.ti -1c
.RI "void \fBsetSteps\fP (int minor, int major)"
.br
.RI "\fISets the spacing of tickmarks for the slider. \fP"
.ti -1c
.RI "\fBQSizePolicy\fP \fBsizePolicy\fP () const "
.br
.RI "\fISpecifies that this widget may stretch horizontally, but is fixed vertically (like \fBQSpinBox\fP itself). \fP"
.ti -1c
.RI "virtual \fBQSize\fP \fBsizeHint\fP () const "
.br
.RI "\fIReturns a size which fits the contents of the control. \fP"
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "void \fBlayout\fP (bool deep)"
.br
.RI "\fICall this function whenever you change something in the geometry of your KNumInput child. \fP"
.ti -1c
.RI "virtual void \fBdoLayout\fP ()=0"
.br
.RI "\fIYou need to overwrite this method and implement your layout calculations there. \fP"
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "\fBKNumInput\fP * \fBm_prev\fP"
.br
.ti -1c
.RI "\fBKNumInput\fP * \fBm_next\fP"
.br
.ti -1c
.RI "int \fBm_colw1\fP"
.br
.ti -1c
.RI "int \fBm_colw2\fP"
.br
.ti -1c
.RI "\fBQLabel\fP * \fBm_label\fP"
.br
.ti -1c
.RI "\fBQSlider\fP * \fBm_slider\fP"
.br
.ti -1c
.RI "\fBQSize\fP \fBm_sizeSlider\fP"
.br
.ti -1c
.RI "\fBQSize\fP \fBm_sizeLabel\fP"
.br
.ti -1c
.RI "int \fBm_alignment\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
You need to inherit from this class if you want to implement K*NumInput for a different variable type. Definition at line 48 of file knuminput.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KNumInput::KNumInput (\fBQWidget\fP * parent = 0, const char * name = 0)"
.PP
Default constructor. Definition at line 60 of file knuminput.cpp.
.PP
References KStdAccel::name().
.SS "KNumInput::KNumInput (\fBKNumInput\fP * below, \fBQWidget\fP * parent = 0, const char * name = 0)"
.PP
\fBParameters:\fP
.RS 4
\fIbelow\fP A pointer to another KNumInput. 
.RE
.PP
Definition at line 66 of file knuminput.cpp.
.PP
References m_next, m_prev, and KStdAccel::name().
.SH "Member Function Documentation"
.PP 
.SS "void KNumInput::setLabel (const \fBQString\fP & label, int a = AlignLeft|AlignTop)\fC [virtual]\fP"
.PP
Sets the text and alignment of the main description label. \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
.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
Reimplemented in \fBKIntNumInput\fP, and \fBKDoubleNumInput\fP.
.PP
Definition at line 99 of file knuminput.cpp.
.PP
References QString::isEmpty(), KStdAccel::label(), QWidget::layout(), QLabel::setAlignment(), and QLabel::setText().
.PP
Referenced by KDoubleNumInput::setLabel(), and KIntNumInput::setLabel().
.SS "\fBQString\fP KNumInput::label () const"
.PP
\fBReturns:\fP
.RS 4
the text of the label. 
.RE
.PP
Definition at line 120 of file knuminput.cpp.
.PP
References QLabel::text().
.SS "bool KNumInput::showSlider () const\fC [inline]\fP"
.PP
\fBReturns:\fP
.RS 4
if the num input has a slider. 
.RE
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP
Definition at line 95 of file knuminput.h.
.SS "void KNumInput::setSteps (int minor, int major)"
.PP
Sets the spacing of tickmarks for the slider. \fBParameters:\fP
.RS 4
\fIminor\fP Minor tickmark separation. 
.br
\fImajor\fP Major tickmark separation. 
.RE
.PP
Definition at line 193 of file knuminput.cpp.
.SS "\fBQSizePolicy\fP KNumInput::sizePolicy () const"
.PP
Specifies that this widget may stretch horizontally, but is fixed vertically (like \fBQSpinBox\fP itself). Reimplemented from \fBQWidget\fP.
.PP
Definition at line 183 of file knuminput.cpp.
.SS "\fBQSize\fP KNumInput::sizeHint () const\fC [virtual]\fP"
.PP
Returns a size which fits the contents of the control. \fBReturns:\fP
.RS 4
the preferred size necessary to show the control 
.RE
.PP
Reimplemented from \fBQWidget\fP.
.PP
Definition at line 188 of file knuminput.cpp.
.PP
References QWidget::minimumSizeHint().
.SS "void KNumInput::layout (bool deep)\fC [protected]\fP"
.PP
Call this function whenever you change something in the geometry of your KNumInput child. Definition at line 126 of file knuminput.cpp.
.PP
References doLayout(), m_colw1, m_colw2, m_next, m_prev, and QSize::width().
.SS "virtual void KNumInput::doLayout ()\fC [protected, pure virtual]\fP"
.PP
You need to overwrite this method and implement your layout calculations there. See \fBKIntNumInput::doLayout\fP and \fBKDoubleNumInput::doLayout\fP implementation for details. Implemented in \fBKIntNumInput\fP, and \fBKDoubleNumInput\fP.
.PP
Referenced by layout().

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