class KDoubleNumInput

KDoubleNumInput combines a QSpinBox and optionally a QSlider with a label to make an easy to use control for setting some float parameter. More...

Definition#include <knuminput.h>
InheritsKNumInput
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Slots

Signals

Protected Methods

Protected Slots

Protected Members


Detailed Description

KDoubleNumInput combines a QSpinBox and optionally a QSlider with a label to make an easy to use control for setting some float parameter. This is especially nice for configuration dialogs, which can have many such combinated controls.

A special feature of KDoubleNumInput, designed specifically for the situation when there are several KDoubleNumInputs in a column, is that you can specify what portion of the control is taken by the QSpinBox (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.

It uses KDoubleValidator validator class. KDoubleNumInput enforces the value to be in the given range.

 KDoubleNumInput (double value, QWidget *parent=0, const char *name=0)

Constructor

Parameters:
valueinitial value for the control
parentparent QWidget
nameinternal name for this widget

KDoubleNumInput ()

[virtual]

destructor

 KDoubleNumInput (KNumInput* below, double value, QWidget* parent=0, const char* name=0)

Constructor

put it below other KNumInput

Parameters:
valueinitial value for the control
parentparent QWidget
nameinternal name for this widget

QSize  minimumSizeHint ()

[const virtual]

This method returns the minimum size necessary to display the control. The minimum size is enough to show all the labels in the current font (font change may invalidate the return value).

Returns: the minimum size necessary to show the control

Reimplemented from QWidget

double  value ()

[const]

Returns: the current value

void  setRange (double lower, double upper, double step=1, bool slider=true)

Parameters:
lowerlower bound on range
upperupper bound on range
stepstep size for the QSlider

void  setFormat (const char* format)

the Format string that should be used to display the double value.

Parameters:
formatuses the same format as QString::sprintf().

void  setSpecialValueText (const QString& text)

Sets the special value text. 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.

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

[virtual]

reimplemented for internal reasons.

Reimplemented from KNumInput

void  setValue (double)

[slot]

Sets the value of the control.

void  setSuffix (QString suffix)

[slot]

sets the Suffix

Parameters:
suffixthe suffix that should be used. QString::null to disable

void  setPrefix (QString prefix)

[slot]

sets the Prefix

Parameters:
prefixthe prefix that should be used. QString::null to disable


Generated by: dfaure@faure on Sun Mar 26 14:24:24 2000, using kdoc 2.0a35.