Author: coolo
Date: Wed Dec 5 10:21:20 2007
New Revision: 42690
URL: http://svn.opensuse.org/viewcvs/yast?rev=42690&view=rev
Log:
I didn't get why RadioButton is a group, so I got rid of this
and also of one more Qt3 class
Modified:
branches/tmp/coolo/qt4-port/src/YQRadioButton.cc
branches/tmp/coolo/qt4-port/src/YQRadioButton.h
branches/tmp/coolo/qt4-port/src/YQRadioButtonGroup.cc
Modified: branches/tmp/coolo/qt4-port/src/YQRadioButton.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/YQRadioButton.cc?rev=42690&r1=42689&r2=42690&view=diff
==============================================================================
--- branches/tmp/coolo/qt4-port/src/YQRadioButton.cc (original)
+++ branches/tmp/coolo/qt4-port/src/YQRadioButton.cc Wed Dec 5 10:21:20 2007
@@ -44,34 +44,26 @@
YQRadioButton::YQRadioButton( YWidget * parent,
const string & label,
bool checked )
- : Q3GroupBox( (QWidget *) (parent->widgetRep() ) )
+ : QRadioButton( fromUTF8( label ), ( QWidget *) (parent->widgetRep() ) )
, YRadioButton( parent, label )
{
setWidgetRep( this );
- setFrameStyle( NoFrame );
- QBoxLayout * layout = new QBoxLayout( QBoxLayout::LeftToRight, this );
-
- _qt_radioButton = new QRadioButton( fromUTF8( label ), this );
-
- layout->addSpacing( SPACING );
- layout->addWidget( _qt_radioButton );
- layout->addSpacing( SPACING );
- _qt_radioButton->setChecked( checked );
+ setChecked( checked );
installEventFilter(this);
- connect ( _qt_radioButton, SIGNAL( toggled ( bool ) ),
- this, SLOT ( changed ( bool ) ) );
+ connect ( this, SIGNAL( toggled ( bool ) ),
+ this, SLOT ( changed ( bool ) ) );
}
void
YQRadioButton::setUseBoldFont( bool useBold )
{
- _qt_radioButton->setFont( useBold ?
- YQUI::yqApp()->boldFont() :
- YQUI::yqApp()->currentFont() );
+ setFont( useBold ?
+ YQUI::yqApp()->boldFont() :
+ YQUI::yqApp()->currentFont() );
YRadioButton::setUseBoldFont( useBold );
}
@@ -79,34 +71,33 @@
int YQRadioButton::preferredWidth()
{
- return 2 * SPACING + _qt_radioButton->sizeHint().width();
+ return sizeHint().width();
}
int YQRadioButton::preferredHeight()
{
- return _qt_radioButton->sizeHint().height();
+ return sizeHint().height();
}
void YQRadioButton::setSize( int newWidth, int newHeight )
{
- _qt_radioButton->resize( newWidth - 2*SPACING, newHeight );
resize( newWidth, newHeight );
}
bool YQRadioButton::value()
{
- return _qt_radioButton->isChecked();
+ return isChecked();
}
void YQRadioButton::setValue( bool newValue )
{
- YQSignalBlocker sigBlocker( _qt_radioButton );
+ YQSignalBlocker sigBlocker( this );
- _qt_radioButton->setChecked( newValue );
+ setChecked( newValue );
if ( newValue )
{
@@ -120,27 +111,21 @@
void YQRadioButton::setLabel( const string & label )
{
- _qt_radioButton->setText( fromUTF8( label ) );
+ setText( fromUTF8( label ) );
YRadioButton::setLabel( label );
}
void YQRadioButton::setEnabled( bool enabled )
{
- _qt_radioButton->setEnabled( enabled );
+ setEnabled( enabled );
YWidget::setEnabled( enabled );
}
-QRadioButton * YQRadioButton::getQtButton()
-{
- return _qt_radioButton;
-}
-
-
bool YQRadioButton::setKeyboardFocus()
{
- _qt_radioButton->setFocus();
+ setFocus();
return true;
}
Modified: branches/tmp/coolo/qt4-port/src/YQRadioButton.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/YQRadioButton.h?rev=42690&r1=42689&r2=42690&view=diff
==============================================================================
--- branches/tmp/coolo/qt4-port/src/YQRadioButton.h (original)
+++ branches/tmp/coolo/qt4-port/src/YQRadioButton.h Wed Dec 5 10:21:20 2007
@@ -21,14 +21,12 @@
#define YQRadioButton_h
#include "YRadioButton.h"
-#include