Author: sh-sh-sh Date: Thu Jun 14 16:50:44 2007 New Revision: 38465 URL: http://svn.opensuse.org/viewcvs/yast?rev=38465&view=rev Log: reimplemented opt boldFont Modified: branches/tmp/sh/mod-ui/qt/src/YQRadioButton.cc branches/tmp/sh/mod-ui/qt/src/YQRadioButton.h Modified: branches/tmp/sh/mod-ui/qt/src/YQRadioButton.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQRadioButton.cc?rev=38465&r1=38464&r2=38465&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/qt/src/YQRadioButton.cc (original) +++ branches/tmp/sh/mod-ui/qt/src/YQRadioButton.cc Thu Jun 14 16:50:44 2007 @@ -52,13 +52,6 @@ layout->addSpacing( SPACING ); layout->addWidget( _qt_radiobutton ); layout->addSpacing( SPACING ); -#if 0 - _qt_radiobutton->setFont( opt.boldFont.value() ? - YQUI::ui()->boldFont() : - YQUI::ui()->currentFont() ); -#else -#warning implement YRadioButton::setBoldFont( bool ) -#endif _qt_radiobutton->setChecked( checked ); connect ( _qt_radiobutton, SIGNAL( toggled ( bool ) ), @@ -66,6 +59,17 @@ } +void +YQRadioButton::setUseBoldFont( bool useBold ) +{ + _qt_radiobutton->setFont( useBold ? + YQUI::ui()->boldFont() : + YQUI::ui()->currentFont() ); + + YRadioButton::setUseBoldFont( useBold ); +} + + long YQRadioButton::nicesize( YUIDimension dim ) { if ( dim == YD_HORIZ ) return 2 * SPACING + _qt_radiobutton->sizeHint().width(); Modified: branches/tmp/sh/mod-ui/qt/src/YQRadioButton.h URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQRadioButton.h?rev=38465&r1=38464&r2=38465&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/qt/src/YQRadioButton.h (original) +++ branches/tmp/sh/mod-ui/qt/src/YQRadioButton.h Thu Jun 14 16:50:44 2007 @@ -41,41 +41,53 @@ /** * Returns the "checked" state of the RadioButton. + * + * Reimplemented from YRadioButton. */ - bool value(); + virtual bool value(); /** * Sets the "checked" state of the RadioButton. + * Reimplemented from YRadioButton. */ - void setValue( bool checked ); + virtual void setValue( bool checked ); /** - * Changes the label of the text entry. + * Changes the label on the RadioButton. + * Reimplemented from YRadioButton. */ - void setLabel( const std::string & label ); + virtual void setLabel( const std::string & label ); + /** + * Use a bold font. + * + * Reimplemented from YRadioButton. + **/ + virtual void setUseBoldFont( bool bold = true ); /** - * Inherited from YWidget: Sets the enabled state of the - * widget. All new widgets are enabled per definition. Only - * enabled widgets can take user input. + * Set enabled / disabled state. + * + * Reimplemented from YWidget. */ - void setEnabled( bool enabled ); + virtual void setEnabled( bool enabled ); /** - * Minimum size the widget should have to make it look and feel - * nice. - * @dim Dimension, either YD_HORIZ or YD_VERT + * Preferred size in the specified dimension. + * + * Reimplemented from YWidget. */ - long nicesize( YUIDimension dim ); + virtual long nicesize( YUIDimension dim ); /** * Sets the new size of the widget. */ - void setSize( long newWidth, long newHeight ); + virtual void setSize( long newWidth, long newHeight ); /** * Accept the keyboard focus. + * + * Reimplemented from YWidget. */ virtual bool setKeyboardFocus(); @@ -90,7 +102,7 @@ * Triggered when the RadioButton is toggled. * This _may_ be of interest to the module. */ - void changed ( bool newState ); + void changed( bool newState ); protected: -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org