|
Public Slots |
| void | setValue (double) |
| void | setRelativeValue (double) |
| void | setReferencePoint (double ref) |
| void | setSuffix (const QString &suffix) |
| void | setPrefix (const QString &prefix) |
Signals |
| void | valueChanged (double) |
| void | relativeValueChanged (double) |
Public Methods |
| | KDoubleNumInput (QWidget *parent=0, const char *name=0) |
| | KDoubleNumInput (double value, QWidget *parent=0, const char *name=0) |
| | KDoubleNumInput (double lower, double upper, double value, double step=0.01, int precision=2, QWidget *parent=0, const char *name=0) |
| virtual | ~KDoubleNumInput () |
| | KDoubleNumInput (KNumInput *below, double value, QWidget *parent=0, const char *name=0) |
| | KDoubleNumInput (KNumInput *below, double lower, double upper, double value, double step=0.02, int precision=2, QWidget *parent=0, const char *name=0) |
| double | value () const |
| QString | suffix () const |
| QString | prefix () const |
| int | precision () const |
| QString | specialValueText () const |
| void | setRange (double min, double max, double step=1, bool slider=true) |
| void | setMinValue (double min) |
| double | minValue () const |
| void | setMaxValue (double max) |
| double | maxValue () const |
| void | setPrecision (int precision) |
| double | referencePoint () const |
| double | relativeValue () const |
| void | setSpecialValueText (const QString &text) |
| virtual void | setLabel (const QString &label, int a=AlignLeft|AlignTop) |
| virtual QSize | minimumSizeHint () const |
| virtual bool | eventFilter (QObject *, QEvent *) |
Protected Methods |
| virtual void | doLayout () |
| void | resizeEvent (QResizeEvent *) |
|
virtual void | virtual_hook (int id, void *data) |
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.