#include <knuminput.h>

Public Member Functions | |
KNumInput (TQWidget *parent=0, const char *name=0) | |
KNumInput (KNumInput *below, TQWidget *parent=0, const char *name=0) | |
virtual void | setLabel (const TQString &label, int a=AlignLeft|AlignTop) |
TQString | label () const |
bool | showSlider () const |
void | setSteps (int minor, int major) |
TQSizePolicy | sizePolicy () const |
virtual TQSize | sizeHint () const |
Protected Member Functions | |
void | layout (bool deep) |
virtual void | doLayout ()=0 |
virtual void | virtual_hook (int id, void *data) |
Protected Attributes | |
KNumInput * | m_prev |
KNumInput * | m_next |
int | m_colw1 |
int | m_colw2 |
TQLabel * | m_label |
TQSlider * | m_slider |
TQSize | m_sizeSlider |
TQSize | m_sizeLabel |
int | m_alignment |
Properties | |
TQString | 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 | ( | TQWidget * | 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 TQObject constructor.
Definition at line 62 of file knuminput.cpp.
KNumInput::KNumInput | ( | KNumInput * | below, |
TQWidget * | parent = 0 , |
||
const char * | name = 0 |
||
) |
- Parameters
-
below A pointer to another KNumInput. parent parent widget name name of the widget
Definition at line 68 of file knuminput.cpp.
Member Function Documentation
|
protectedpure virtual |
You need to overwrite this method and implement your layout calculations there.
See KIntNumInput::doLayout and KDoubleNumInput::doLayout implementation for details.
Implemented in KDoubleNumInput, and KIntNumInput.
TQString KNumInput::label | ( | ) | const |
- Returns
- the text of the label.
|
protected |
Call this function whenever you change something in the geometry of your KNumInput child.
Definition at line 128 of file knuminput.cpp.
|
virtual |
Sets the text and alignment of the main description label.
- Parameters
-
label The text of the label. Use TQString::null to remove an existing one. a one of AlignLeft
,AlignHCenter
, YAlignRight andAlignTop
,AlignVCenter
,AlignBottom
. default isAlignLeft
|AlignTop
.
The vertical alignment flags have special meaning with this widget:
@li @p AlignTop The label is placed above the edit/slider @li @p AlignVCenter The label is placed left beside the edit @li @p AlignBottom The label is placed below the edit/slider
Reimplemented in KDoubleNumInput, and KIntNumInput.
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.
|
inline |
|
virtual |
Returns a size which fits the contents of the control.
- Returns
- the preferred size necessary to show the control
Definition at line 190 of file knuminput.cpp.
TQSizePolicy KNumInput::sizePolicy | ( | ) | const |
Specifies that this widget may stretch horizontally, but is fixed vertically (like TQSpinBox itself).
Definition at line 185 of file knuminput.cpp.
The documentation for this class was generated from the following files: