1 /*---------------------------------------------------------------------\
3 | __ __ ____ _____ ____ |
4 | \ \ / /_ _/ ___|_ _|___ \ |
5 | \ V / _` \___ \ | | __) | |
6 | | | (_| |___) || | / __/ |
7 | |_|\__,_|____/ |_| |_____| |
11 \----------------------------------------------------------------------/
15 Author: Stefan Hundhammer <sh@suse.de>
20 #ifndef YQRadioButton_h
21 #define YQRadioButton_h
23 #include "YRadioButton.h"
24 #include <QRadioButton>
29 class YQRadioButton : public QRadioButton, public YRadioButton
37 YQRadioButton( YWidget * parent,
42 * Return the "checked" state of the RadioButton.
44 * Reimplemented from YRadioButton.
49 * Set the "checked" state of the RadioButton.
51 * Reimplemented from YRadioButton.
53 virtual void setValue( bool checked );
56 * Change the label (the text) on the RadioButton.
58 * Reimplemented from YRadioButton.
60 virtual void setLabel( const string & label );
65 * Reimplemented from YRadioButton.
67 virtual void setUseBoldFont( bool bold = true );
70 * Set enabled / disabled state.
72 * Reimplemented from YWidget.
74 virtual void setEnabled( bool enabled );
77 * Preferred width of the widget.
79 * Reimplemented from YWidget.
81 virtual int preferredWidth();
84 * Preferred height of the widget.
86 * Reimplemented from YWidget.
88 virtual int preferredHeight();
91 * Set the new size of the widget.
93 * Reimplemented from YWidget.
95 virtual void setSize( int newWidth, int newHeight );
98 * Accept the keyboard focus.
100 * Reimplemented from YWidget.
102 virtual bool setKeyboardFocus();
106 * Triggered when the RadioButton is toggled.
108 void changed( bool newState );
111 * Redirect events to this object.
113 bool eventFilter( QObject * obj, QEvent * event );
117 #endif // YQRadioButton_h