|
|
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.
The slider is created only when the user specifies a range for the control using the setRange function with the slider parameter set to "true".
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.
See also: KIntNumInput
|
Constructs an input control for double values with initial value 0.0.
|
Constructor
Parameters:
value | initial value for the control |
parent | parent QWidget |
name | internal name for this widget |
|
[virtual]
destructor
|
Constructor
put it below other KNumInput
Parameters:
value | initial value for the control |
parent | parent QWidget |
name | internal name for this widget |
double |
[const]
Returns: the current value.
QString |
[const]
Returns: the suffix.
See also: setSuffix()
QString |
[const]
Returns: the prefix.
See also: setPrefix()
const char * |
[const]
Returns: the format.
See also: setFormat()
QString |
[const]
Returns: the string displayed for a special value.
See also: setSpecialValueText()
void |
Parameters:
lower | lower bound on range |
upper | upper bound on range |
step | step size for the QSlider |
void |
Sets the format string that should be used to display the double value. The format string follows the same rules as the printf() function or QString::sprintf(). You can use this if you want to set the number of digits to be displayed, etc.
void |
Sets the special value text. If set, the spin box 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 |
[virtual]
Reimplemented from KNumInput for internal reasons; the API is not affected.
QSize |
[const virtual]
bool |
[virtual]
void |
[slot]
Sets the value of the control.
void |
[slot]
Sets the suffix to be displayed to suffix.
Use QString::null to disable
this feature. Note that the suffix is attached to the value without any
spacing. So if you prefer to display a space separator, set suffix
to something like " cm".
See also: setSuffix()
void |
[slot]
Sets the prefix to be displayed to prefix.
Use QString::null to disable
this feature. Note that the prefix is attached to the value without any
spacing.
See also: setPrefix()
void |
[signal]
Emitted every time the value changes (by calling setValue() or by user interaction).
void |
[protected: virtual]
Reimplemented from KNumInput for internal reasons; the API is not affected.
void |
[protected: ]
void |
[protected: virtual]
KDoubleLine* |
[protected: ]
bool |
[protected: ]
double |
[protected: ]
double |
[protected: ]
double |
[protected: ]
QSize |
[protected: ]
friend class |
[protected: ]
Generated by: marc@yogi on Tue Mar 27 13:07:09 2001, using kdoc 2.0a48. |