class KNumInput

# class KNumInput | You need to inherit from this class if you want to implement K*NumInput for a different variable type More...
Contains pure virtuals
Definition | `#include <knuminput.h>`
Inherits | QWidget (qt) [public ]
Inherited by | KDoubleNumInput, KIntNumInput
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- KNumInput (QWidget* parent=0, const char* name=0)
- KNumInput (KNumInput* below, QWidget* parent=0, const char* name=0)
- ~KNumInput ()
- virtual void setLabel (const QString & label, int a = AlignLeft | AlignTop)
- QString label () const
- bool showSlider () const
- void setSteps (int minor, int major)
- QSizePolicy sizePolicy () const
- virtual QSize sizeHint () const

#### Protected Methods

- void layout (bool deep)
- virtual void doLayout ()
- virtual void virtual_hook ( int id, void* data )

#### Protected Members

- KNumInput* m_prev
- KNumInput*m_next
- int m_colw1
- int m_colw2
- QLabel* m_label
- QSlider* m_slider
- QSize m_sizeSlider
- QSize m_sizeLabel
- int m_alignment

## Detailed Description

You need to inherit from this class if you want to implement K*NumInput for a different variable type

KNumInput (QWidget* parent=0, const char* name=0) | ### KNumInput

Default constructor

KNumInput (KNumInput* below, QWidget* parent=0, const char* name=0) | ### KNumInput

Parameters:

below | A pointer to another KNumInput.

~KNumInput () | ### ~KNumInput

void setLabel (const QString & label, int a = AlignLeft | AlignTop) | ### setLabel

[virtual]

Sets the text and alignment of the main description label.

The vertical alignment flags have special meaning with this widget:

- `AlignTop` The label is placed above the edit/slider
- `AlignVCenter` The label is placed left beside the edit
- `AlignBottom` The label is placed below the edit/slider

Parameters:

label | The text of the label. Use QString::null to remove an existing one.
a | one of `AlignLeft`, `AlignHCenter`, YAlignRight and `AlignTop`, `AlignVCenter`, `AlignBottom`. default is `AlignLeft` | `AlignTop`.

QString label () | ### label

[const]

Returns: the text of the label.

bool showSlider () | ### showSlider

[const]

Returns: if the num input has a slider.

void setSteps (int minor, int major) | ### setSteps

Sets the spacing of tickmarks for the slider.

Parameters:

minor | Minor tickmark separation.
major | Major tickmark separation.

QSizePolicy sizePolicy () | ### sizePolicy

[const]

Specifies that this widget may stretch horizontally, but is fixed vertically (like QSpinBox itself).

Reimplemented from QWidget.

QSize sizeHint () | ### sizeHint

[const virtual]

Returns a size which fits the contents of the control.

Returns: the preferred size necessary to show the control

void layout (bool deep) | ### layout

[protected]

Call this function whenever you change something in the geometry of your KNumInput child.

void doLayout () | ### doLayout

[protected pure virtual]

You need to overwrite this method and implement your layout calculations there.

See KIntNumInput::doLayout and KDoubleNumInput::doLayout implementation for details.

KNumInput* m_prev | ### m_prev

[protected]

KNumInput* m_next | ### m_next

[protected]

int m_colw1 | ### m_colw1

[protected]

int m_colw2 | ### m_colw2

[protected]

QLabel* m_label | ### m_label

[protected]

QSlider* m_slider | ### m_slider

[protected]

QSize m_sizeSlider | ### m_sizeSlider

[protected]

QSize m_sizeLabel | ### m_sizeLabel

[protected]

int m_alignment | ### m_alignment

[protected]

void virtual_hook ( int id, void* data ) | ### virtual_hook

[protected virtual]

Generated by: root on macppc.ports.openbsd.org on Sat Sep 6 10:36:37 2003, using kdoc 2.0a54.