Author: coolo
Date: Wed Dec 5 19:59:04 2007
New Revision: 42738
URL: http://svn.opensuse.org/viewcvs/yast?rev=42738&view=rev
Log:
Qt3 support is gone for the base UI
Modified:
branches/tmp/coolo/qt4-port/src/CMakeLists.txt
branches/tmp/coolo/qt4-port/src/YQCheckBox.cc
branches/tmp/coolo/qt4-port/src/YQCheckBox.h
branches/tmp/coolo/qt4-port/src/YQDateField.cc
branches/tmp/coolo/qt4-port/src/YQDateField.h
Modified: branches/tmp/coolo/qt4-port/src/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/CMakeLists.txt?rev=42738&r1=42737&r2=42738&view=diff
==============================================================================
--- branches/tmp/coolo/qt4-port/src/CMakeLists.txt (original)
+++ branches/tmp/coolo/qt4-port/src/CMakeLists.txt Wed Dec 5 19:59:04 2007
@@ -44,7 +44,6 @@
TARGET_LINK_LIBRARIES( py2qt4 ${YAST_PLUGIN_WFM_LIBRARY} )
TARGET_LINK_LIBRARIES( py2qt4 ${QT_QTCORE_LIBRARY} )
TARGET_LINK_LIBRARIES( py2qt4 ${QT_QTGUI_LIBRARY} )
-TARGET_LINK_LIBRARIES( py2qt4 ${QT_QT3SUPPORT_LIBRARY} )
TARGET_LINK_LIBRARIES( py2qt4 ${YAST_PLUGIN_UI_LIBRARY} )
SET_TARGET_PROPERTIES( py2qt4 PROPERTIES SOVERSION 2 )
Modified: branches/tmp/coolo/qt4-port/src/YQCheckBox.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/YQCheckBox.cc?rev=42738&r1=42737&r2=42738&view=diff
==============================================================================
--- branches/tmp/coolo/qt4-port/src/YQCheckBox.cc (original)
+++ branches/tmp/coolo/qt4-port/src/YQCheckBox.cc Wed Dec 5 19:59:04 2007
@@ -35,24 +35,14 @@
YQCheckBox::YQCheckBox( YWidget * parent,
const string & label,
bool checked )
- : Q3GroupBox( (QWidget *) parent->widgetRep() )
+ : QCheckBox( fromUTF8( label ), (QWidget *) parent->widgetRep() )
, YCheckBox( parent, label )
{
setWidgetRep( this );
- setFrameStyle( NoFrame );
- QBoxLayout * layout = new QBoxLayout( QBoxLayout::LeftToRight, this );
+ QCheckBox::setChecked( checked );
- _qt_checkBox = new QCheckBox( fromUTF8( label ), this );
- YUI_CHECK_NEW( _qt_checkBox );
-
- layout->addSpacing( SPACING );
- layout->addWidget( _qt_checkBox );
- layout->addSpacing( SPACING );
-
- _qt_checkBox->setChecked( checked );
-
- connect( _qt_checkBox, SIGNAL( stateChanged( int ) ),
+ connect( this, SIGNAL( stateChanged( int ) ),
this, SLOT ( stateChanged( int ) ) );
}
@@ -66,7 +56,7 @@
YCheckBoxState
YQCheckBox::value()
{
- switch ( _qt_checkBox->checkState() )
+ switch ( checkState() )
{
case Qt::Checked: return YCheckBox_on;
case Qt::Unchecked: return YCheckBox_off;
@@ -83,18 +73,18 @@
switch ( newValue )
{
case YCheckBox_on:
- _qt_checkBox->setChecked( true );
- _qt_checkBox->setTristate( false );
+ QCheckBox::setChecked( true );
+ setTristate( false );
break;
case YCheckBox_off:
- _qt_checkBox->setChecked( false );
- _qt_checkBox->setTristate( false );
+ QCheckBox::setChecked( false );
+ setTristate( false );
break;
case YCheckBox_dont_care:
- _qt_checkBox->setTristate( true );
- _qt_checkBox->setCheckState(Qt::PartiallyChecked);
+ QCheckBox::setTristate( true );
+ setCheckState(Qt::PartiallyChecked);
break;
}
}
@@ -102,14 +92,14 @@
void YQCheckBox::setLabel( const string & label )
{
- _qt_checkBox->setText( fromUTF8( label ) );
+ setText( fromUTF8( label ) );
YCheckBox::setLabel( label );
}
void YQCheckBox::setUseBoldFont( bool useBold )
{
- _qt_checkBox->setFont( useBold ?
+ setFont( useBold ?
YQUI::yqApp()->boldFont() :
YQUI::yqApp()->currentFont() );
@@ -119,33 +109,32 @@
void YQCheckBox::setEnabled( bool enabled )
{
- _qt_checkBox->setEnabled( enabled );
+ setEnabled( enabled );
YWidget::setEnabled( enabled );
}
int YQCheckBox::preferredWidth()
{
- return 2*SPACING + _qt_checkBox->sizeHint().width();
+ return 2*SPACING + sizeHint().width();
}
int YQCheckBox::preferredHeight()
{
- return _qt_checkBox->sizeHint().height();
+ return sizeHint().height();
}
void YQCheckBox::setSize( int newWidth, int newHeight )
{
- _qt_checkBox->resize( newWidth - 2*SPACING, newHeight );
resize( newWidth, newHeight );
}
bool YQCheckBox::setKeyboardFocus()
{
- _qt_checkBox->setFocus();
+ setFocus();
return true;
}
Modified: branches/tmp/coolo/qt4-port/src/YQCheckBox.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/YQCheckBox.h?rev=42738&r1=42737&r2=42738&view=diff
==============================================================================
--- branches/tmp/coolo/qt4-port/src/YQCheckBox.h (original)
+++ branches/tmp/coolo/qt4-port/src/YQCheckBox.h Wed Dec 5 19:59:04 2007
@@ -20,13 +20,10 @@
#ifndef YQCheckBox_h
#define YQCheckBox_h
-#include <Q3GroupBox>
+#include <QCheckBox>
#include "YCheckBox.h"
-
-class QCheckBox;
-
-class YQCheckBox : public Q3GroupBox, public YCheckBox
+class YQCheckBox : public QCheckBox, public YCheckBox
{
Q_OBJECT
@@ -121,10 +118,6 @@
**/
void stateChanged ( int newState );
-
-protected:
-
- QCheckBox * _qt_checkBox;
};
#endif // YQCheckBox_h
Modified: branches/tmp/coolo/qt4-port/src/YQDateField.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/YQDateField.cc?rev=42738&r1=42737&r2=42738&view=diff
==============================================================================
--- branches/tmp/coolo/qt4-port/src/YQDateField.cc (original)
+++ branches/tmp/coolo/qt4-port/src/YQDateField.cc Wed Dec 5 19:59:04 2007
@@ -44,12 +44,12 @@
YUI_CHECK_NEW( _caption );
layout->addWidget( _caption );
- _qt_dateEdit = new Q3DateEdit( this );
+ _qt_dateEdit = new QDateEdit( this );
YUI_CHECK_NEW( _qt_dateEdit );
layout->addWidget( _qt_dateEdit );
//_qt_dateEdit->setAutoAdvance( true );
- _qt_dateEdit->setOrder( Q3DateEdit::DMY );
+ _qt_dateEdit->setDisplayFormat( "dd.MM.yyyy" );
_caption->setBuddy( _qt_dateEdit );
}
Modified: branches/tmp/coolo/qt4-port/src/YQDateField.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/YQDateField.h?rev=42738&r1=42737&r2=42738&view=diff
==============================================================================
--- branches/tmp/coolo/qt4-port/src/YQDateField.h (original)
+++ branches/tmp/coolo/qt4-port/src/YQDateField.h Wed Dec 5 19:59:04 2007
@@ -21,7 +21,7 @@
#define YQDateField_h
#include <QFrame>
-#include