1 /*---------------------------------------------------------------------\
3 | __ __ ____ _____ ____ |
4 | \ \ / /_ _/ ___|_ _|___ \ |
5 | \ V / _` \___ \ | | __) | |
6 | | | (_| |___) || | / __/ |
7 | |_|\__,_|____/ |_| |_____| |
11 \----------------------------------------------------------------------/
15 Author: Stefan Hundhammer <sh@suse.de>
27 class YQWidgetCaption;
31 class YQSlider : public QFrame, public YSlider
40 * 'reverseLayout' creates the QSpinBox to the left and the QSlider to the right.
42 YQSlider( YWidget * parent,
47 bool reverseLayout = false );
55 * Get the current value (the number entered by the user or set from the
56 * outside) of this slider.
58 * Implemented from YSlider / YIntField.
65 * Set the current value (the number entered by the user or set from the
66 * outside) of this slider. 'val' is guaranteed to be between minValue
67 * and maxValue; no further checks are required.
69 * Implemented from YSlider/ YIntField.
71 virtual void setValueInternal( int val );
76 * Set the label (the caption above the input field).
78 * Reimplemented from YSlider / YIntField.
80 virtual void setLabel( const string & label );
83 * Set enabled/disabled state.
85 * Reimplemented from YWidget.
87 virtual void setEnabled( bool enabled );
90 * Preferred width of the widget.
92 * Reimplemented from YWidget.
94 virtual int preferredWidth();
97 * Preferred height of the widget.
99 * Reimplemented from YWidget.
101 virtual int preferredHeight();
104 * Set the new size of the widget.
106 * Reimplemented from YWidget.
108 virtual void setSize( int newWidth, int newHeight );
111 * Accept the keyboard focus.
113 virtual bool setKeyboardFocus();
118 * Slot for "value changed". This will send a ValueChanged event if
121 void valueChangedSlot( int newValue );
126 * Emitted when the value changes (regardless of the notify flag).
128 void valueChanged( int newValue );
133 YQWidgetCaption * _caption;
134 QSlider * _qt_slider;
135 QSpinBox * _qt_spinBox;