Author: sh-sh-sh Date: Thu Jun 14 16:50:35 2007 New Revision: 38464 URL: http://svn.opensuse.org/viewcvs/yast?rev=38464&view=rev Log: reimplemented opt boldFont Modified: branches/tmp/sh/mod-ui/core/libyui/src/ChangeLog branches/tmp/sh/mod-ui/core/libyui/src/YRadioButton.cc branches/tmp/sh/mod-ui/core/libyui/src/YRadioButton.h branches/tmp/sh/mod-ui/core/libyui/src/YUI_widgets.cc Modified: branches/tmp/sh/mod-ui/core/libyui/src/ChangeLog URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src/ChangeLog?rev=38464&r1=38463&r2=38464&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/core/libyui/src/ChangeLog (original) +++ branches/tmp/sh/mod-ui/core/libyui/src/ChangeLog Thu Jun 14 16:50:35 2007 @@ -59,6 +59,9 @@ * virtual YCPBoolean getValue() -> virtual bool value() * virtual void setValue( YCPBoolean ) -> virtual void setValue( bool ) + * new method: useBoldFont() (instead of YWidgetOpt::boldFont() ) + * new method: boldFont() + * YTextEntry: Modified: branches/tmp/sh/mod-ui/core/libyui/src/YRadioButton.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src/YRadioButton.cc?rev=38464&r1=38463&r2=38464&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/core/libyui/src/YRadioButton.cc (original) +++ branches/tmp/sh/mod-ui/core/libyui/src/YRadioButton.cc Thu Jun 14 16:50:35 2007 @@ -40,6 +40,7 @@ YRadioButtonPrivate( std::string label ) : label( label ) , radioButtonGroup( 0 ) + , useBoldFont( false ) {} // @@ -48,6 +49,7 @@ std::string label; YRadioButtonGroup * radioButtonGroup; + bool useBoldFont; }; @@ -79,6 +81,18 @@ } +bool YRadioButton::useBoldFont() const +{ + return priv->useBoldFont; +} + + +void YRadioButton::setUseBoldFont( bool bold ) +{ + priv->useBoldFont = bold; +} + + const YPropertySet & YRadioButton::propertySet() { Modified: branches/tmp/sh/mod-ui/core/libyui/src/YRadioButton.h URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src/YRadioButton.h?rev=38464&r1=38463&r2=38464&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/core/libyui/src/YRadioButton.h (original) +++ branches/tmp/sh/mod-ui/core/libyui/src/YRadioButton.h Thu Jun 14 16:50:35 2007 @@ -93,6 +93,19 @@ virtual void setLabel( const std::string & label ); /** + * Returns 'true' if a bold font should be used. + **/ + bool useBoldFont() const; + + /** + * Indicate whether or not a bold font should be used. + * + * Derived classes are free to reimplement this, but they should call this + * base class method at the end of the overloaded function. + **/ + virtual void setUseBoldFont( bool bold = true ); + + /** * Get a pointer to the radio button group this button belongs to. */ YRadioButtonGroup *buttonGroup(); Modified: branches/tmp/sh/mod-ui/core/libyui/src/YUI_widgets.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src/YUI_widgets.cc?rev=38464&r1=38463&r2=38464&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/core/libyui/src/YUI_widgets.cc (original) +++ branches/tmp/sh/mod-ui/core/libyui/src/YUI_widgets.cc Thu Jun 14 16:50:35 2007 @@ -1616,7 +1616,12 @@ if ( s == 2 ) isChecked = term->value( argnr+1 )->asBoolean()->value(); - return widgetFactory()->createRadioButton( parent, label, isChecked ); + YRadioButton * radioButton = widgetFactory()->createRadioButton( parent, label, isChecked ); + + if ( opt.boldFont.value() ) + radioButton->setUseBoldFont(); + + return radioButton; } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org