1 /*---------------------------------------------------------------------\
3 | __ __ ____ _____ ____ |
4 | \ \ / /_ _/ ___|_ _|___ \ |
5 | \ V / _` \___ \ | | __) | |
6 | | | (_| |___) || | / __/ |
7 | |_|\__,_|____/ |_| |_____| |
11 \----------------------------------------------------------------------/
15 Author: Stefan Hundhammer <sh@suse.de>
26 #include "YIntField.h"
29 class YQWidgetCaption;
33 class YQIntField : public QFrame, public YIntField
42 YQIntField( YWidget * parent,
51 virtual ~YQIntField();
54 * Get the current value (the number entered by the user or set from the
55 * outside) of this IntField.
57 * Implemented from YIntField.
64 * Set the current value (the number entered by the user or set from the
65 * outside) of this IntField. 'val' is guaranteed to be between minValue
66 * and maxValue; no further checks are required.
68 * Implemented from YIntField.
70 virtual void setValueInternal( int val );
75 * Set the label (the caption above the input field).
77 * Reimplemented from YIntField.
79 virtual void setLabel( const string & label );
82 * Sets the widget's enabled state.
84 * Inherited from YWidget.
86 virtual void setEnabled( bool enabled );
89 * Preferred width of the widget.
91 * Reimplemented from YWidget.
93 virtual int preferredWidth();
96 * Preferred height of the widget.
98 * Reimplemented from YWidget.
100 virtual int preferredHeight();
103 * Set the new size of the widget.
105 * Reimplemented from YWidget.
107 virtual void setSize( int newWidth, int newHeight );
110 * Accept the keyboard focus.
112 * Reimplemented from YWidget.
114 virtual bool setKeyboardFocus();
120 * Emitted when the value changes (regardless of the notify flag).
122 void valueChanged( int newValue );
128 * Slot for "value changed". This will send a ValueChanged event if
131 void valueChangedSlot( int newValue );
136 YQWidgetCaption * _caption;
137 QSpinBox * _qt_spinBox;
141 #endif // YQIntField_h