class KDoubleNumInput |
|
|
An input control for real numbers, consisting of a spinbox and a slider. 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 instances 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 the KDoubleValidator validator class. KDoubleNumInput enforces the value to be in the given range, but see the class documentation of KDoubleSpinBox for the tricky interrelationship of precision and values. All of what is said there applies here, too. See also KIntNumInput, KDoubleSpinBox |
|
Constructs an input control for double values with initial value 0.00. |
|
Constructor
lower - lower boundary value upper - upper boundary value value - initial value for the control step - step size to use for up/down arrow clicks precision - number of digits after the decimal point parent - parent QWidget |
|
Constructor the difference here is the "below" parameter. It tells this instance that it is visually put below some other KNumInput widget. Note that these two KNumInput's need not to have the same parent widget or be in the same layout group. The effect is that it'll adjust it's layout in correspondence with the layout of the other KNumInput's (you can build an arbitrary long chain).
below - append KDoubleNumInput to the KDoubleNumInput chain lower - lower boundary value upper - upper boundary value value - initial value for the control step - step size to use for up/down arrow clicks precision - number of digits after the decimal point parent - parent QWidget Deprecated use the version without below instead |
|
|
|
Returns the maximum value. |
|
Returns the minimum value. |
|
|
Returns the precision. See also setPrecision() |
|
Returns the prefix. See also setPrefix() |
|
Returns the reference point for relativeValue calculation |
|
Returns the current value in units of referencePoint. |
|
This is an overloaded member function, provided for convenience. It essentially behaves like the above function. Contains the value in units of referencePoint. |
|
|
|
Sets the maximum value. |
|
Sets the minimum value. |
|
Specifies the number of digits to use. |
|
Sets the prefix to be displayed to prefix. Use QString() to disable this feature. Note that the prefix is attached to the value without any spacing. See also setPrefix() |
|
min - minimum value max - maximum value step - step size for the QSlider slider - whether the slider is created or not |
|
Sets the reference Point to ref. It ref == 0, emitting of relativeValueChanged is blocked and relativeValue just returns 0. |
|
Sets the value in units of referencePoint. |
|
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. |
|
Sets the suffix to be displayed to suffix. Use QString() 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() |
|
Sets the value of the control. |
|
Returns the string displayed for a special value. See also setSpecialValueText() |
|
Returns the suffix. See also setSuffix() |
|
Returns the current value. |
|
Emitted every time the value changes (by calling setValue() or by user interaction). |