kdeui
KNumInput Class Reference
You need to inherit from this class if you want to implement K*NumInput for a different variable type. More...
#include <knuminput.h>

| Public Member Functions | |
| KNumInput (KNumInput *below, QWidget *parent=0, const char *name=0) | |
| KNumInput (QWidget *parent=0, const char *name=0) | |
| QString | label () const | 
| virtual void | setLabel (const QString &label, int a=AlignLeft|AlignTop) | 
| void | setSteps (int minor, int major) | 
| bool | showSlider () const | 
| virtual QSize | sizeHint () const | 
| QSizePolicy | sizePolicy () const | 
| ~KNumInput () | |
| Protected Member Functions | |
| virtual void | doLayout ()=0 | 
| void | layout (bool deep) | 
| virtual void | virtual_hook (int id, void *data) | 
| Protected Attributes | |
| int | m_alignment | 
| int | m_colw1 | 
| int | m_colw2 | 
| QLabel * | m_label | 
| KNumInput * | m_next | 
| KNumInput * | m_prev | 
| QSize | m_sizeLabel | 
| QSize | m_sizeSlider | 
| QSlider * | m_slider | 
| Properties | |
| QString | label | 
Detailed Description
You need to inherit from this class if you want to implement K*NumInput for a different variable type.
Definition at line 49 of file knuminput.h.
Constructor & Destructor Documentation
| KNumInput::KNumInput | ( | QWidget * | parent = 0, | |
| const char * | name = 0 | |||
| ) | 
Default constructor.
- Parameters:
- 
  parent If parent is 0, the new widget becomes a top-level window. If parent is another widget, this widget becomes a child window inside parent. The new widget is deleted when its parent is deleted. name The name is sent to the QObject constructor. 
Definition at line 62 of file knuminput.cpp.
- Parameters:
- 
  below A pointer to another KNumInput. parent parent widget name name of the widget 
Definition at line 68 of file knuminput.cpp.
| KNumInput::~KNumInput | ( | ) | 
Definition at line 92 of file knuminput.cpp.
Member Function Documentation
| virtual void KNumInput::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.
Implemented in KIntNumInput, and KDoubleNumInput.
| QString KNumInput::label | ( | ) | const | 
- Returns:
- the text of the label.
| void KNumInput::layout | ( | bool | deep | ) |  [protected] | 
Call this function whenever you change something in the geometry of your KNumInput child.
Definition at line 128 of file knuminput.cpp.
| void KNumInput::setLabel | ( | const QString & | label, | |
| int | a = AlignLeft | AlignTop | |||
| ) |  [virtual] | 
Sets the text and alignment of the main description label.
- Parameters:
- 
  label The text of the label. Use QString::null to remove an existing one. a one of AlignLeft,AlignHCenter, YAlignRight andAlignTop,AlignVCenter,AlignBottom. default isAlignLeft|AlignTop.
- AlignTopThe label is placed above the edit/slider
- AlignVCenterThe label is placed left beside the edit
- AlignBottomThe label is placed below the edit/slider
Reimplemented in KIntNumInput, and KDoubleNumInput.
Definition at line 101 of file knuminput.cpp.
| void KNumInput::setSteps | ( | int | minor, | |
| int | major | |||
| ) | 
Sets the spacing of tickmarks for the slider.
- Parameters:
- 
  minor Minor tickmark separation. major Major tickmark separation. 
Definition at line 195 of file knuminput.cpp.
| bool KNumInput::showSlider | ( | ) | const  [inline] | 
| QSize KNumInput::sizeHint | ( | void | ) | const  [virtual] | 
Returns a size which fits the contents of the control.
- Returns:
- the preferred size necessary to show the control
Reimplemented from QWidget.
Definition at line 190 of file knuminput.cpp.
| QSizePolicy KNumInput::sizePolicy | ( | ) | const | 
Specifies that this widget may stretch horizontally, but is fixed vertically (like QSpinBox itself).
Reimplemented from QWidget.
Definition at line 185 of file knuminput.cpp.
| void KNumInput::virtual_hook | ( | int | id, | |
| void * | data | |||
| ) |  [protected, virtual] | 
Member Data Documentation
| int KNumInput::m_alignment  [protected] | 
Definition at line 146 of file knuminput.h.
| int KNumInput::m_colw1  [protected] | 
Definition at line 140 of file knuminput.h.
| int KNumInput::m_colw2  [protected] | 
Definition at line 140 of file knuminput.h.
| QLabel* KNumInput::m_label  [protected] | 
Definition at line 142 of file knuminput.h.
| KNumInput * KNumInput::m_next  [protected] | 
Definition at line 139 of file knuminput.h.
| KNumInput* KNumInput::m_prev  [protected] | 
Definition at line 139 of file knuminput.h.
| QSize KNumInput::m_sizeLabel  [protected] | 
Definition at line 144 of file knuminput.h.
| QSize KNumInput::m_sizeSlider  [protected] | 
Definition at line 144 of file knuminput.h.
| QSlider* KNumInput::m_slider  [protected] | 
Definition at line 143 of file knuminput.h.
Property Documentation
| QString KNumInput::label  [read, write] | 
Definition at line 52 of file knuminput.h.
The documentation for this class was generated from the following files:
 KDE 3.5 API Reference
    KDE 3.5 API Reference