Author: dmacvicar
Date: Sat Dec 8 02:37:14 2007
New Revision: 42844
URL: http://svn.opensuse.org/viewcvs/yast?rev=42844&view=rev
Log:
YQPatternSelector QT3_SUPPORT
Modified:
trunk/qt4/src/pkg/YQPatternSelector.cc
Modified: trunk/qt4/src/pkg/YQPatternSelector.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt4/src/pkg/YQPatternSelector.cc?rev=42844&r1=42843&r2=42844&view=diff
==============================================================================
--- trunk/qt4/src/pkg/YQPatternSelector.cc (original)
+++ trunk/qt4/src/pkg/YQPatternSelector.cc Sat Dec 8 02:37:14 2007
@@ -19,13 +19,10 @@
/-*/
-#define QT3_SUPPORT 1
-
-#include
-#include
-#include
-#include
-#include
+#include <QApplication>
+#include <QHeaderView>
+#include <QPushButton>
+#include <QSplitter>
#define y2log_component "qt-pkg"
#include
@@ -121,8 +118,8 @@
int left_pane_width = (int) ( 0.3 * YQUI::ui()->defaultSize( YD_HORIZ ) );
left_pane->resize( QSize( left_pane_width, left_pane->height() ) );
- outer_splitter->setResizeMode( left_pane, QSplitter::KeepSize );
- outer_splitter->setResizeMode( right_pane, QSplitter::Stretch );
+ outer_splitter->setStretchFactor(outer_splitter->indexOf(left_pane), 0);
+ outer_splitter->setStretchFactor(outer_splitter->indexOf(right_pane), 1);
if ( ! _wizard )
layoutButtons( this );
@@ -133,9 +130,11 @@
QWidget *
YQPatternSelector::layoutLeftPane( QWidget * parent )
{
- Q3VBox * vbox = new Q3VBox( parent );
+ QWidget *vbox = new QWidget(parent);
+ QVBoxLayout * layout = new QVBoxLayout( vbox );
Q_CHECK_PTR( vbox );
- vbox->setMargin( MARGIN );
+ layout->setMargin( MARGIN );
+ vbox->setLayout(layout);
if ( ! zyppPool().emptyzypp::Pattern() )
{
@@ -147,7 +146,8 @@
false, // no autoFill - need to connect to details view first
false ); // no autoFilter - filterMatch() is not connected
Q_CHECK_PTR( _patternList );
- //FIXME _patternList->header()->hide();
+ layout->addWidget(_patternList);
+ _patternList->header()->hide();
}
if ( ! _patternList )
@@ -167,7 +167,8 @@
false, // no autoFill - need to connect to details view first
false ); // no autoFilter - filterMatch() is not connected
Q_CHECK_PTR( _selList );
- //FIXME _selList->header()->hide();
+ layout->addWidget(_selList);
+ _selList->header()->hide();
}
if ( _wizard ) // No button box - add "Details..." button here
@@ -176,18 +177,20 @@
// "Details" button
//
- addVSpacing( vbox, SPACING );
+ layout->addSpacing( SPACING );
- Q3HBox * hbox = new Q3HBox( vbox );
+ QHBoxLayout * hbox = new QHBoxLayout();
Q_CHECK_PTR( hbox );
+ layout->addLayout(hbox);
- QPushButton * details_button = new QPushButton( _( "&Details..." ), hbox );
+ QPushButton * details_button = new QPushButton( _( "&Details..." ), vbox );
Q_CHECK_PTR( details_button );
+ hbox->addWidget(details_button);
connect( details_button, SIGNAL( clicked() ),
this, SLOT ( detailedPackageSelection() ) );
- addHStretch( hbox );
+ hbox->addStretch();
}
return vbox;
@@ -200,32 +203,37 @@
{
QSplitter * splitter = new QSplitter( Qt::Vertical, parent );
Q_CHECK_PTR( splitter );
- splitter->setMargin( MARGIN );
+ //splitter->setMargin( MARGIN );
//
// Selection / Pattern description
//
-
- Q3VBox * upper_vbox = new Q3VBox( splitter );
+ QWidget *upper_vbox = new QWidget(splitter);
+ QVBoxLayout * layout = new QVBoxLayout(upper_vbox);
+
Q_CHECK_PTR( upper_vbox );
_descriptionView = new YQPkgSelDescriptionView( upper_vbox );
Q_CHECK_PTR( _descriptionView );
+ layout->addWidget(_descriptionView);
- addVSpacing( upper_vbox, MARGIN );
+ layout->addSpacing( MARGIN );
//
// Disk usage
//
- Q3VBox * lower_vbox = new Q3VBox( splitter );
+ QWidget *lower_vbox = new QWidget(splitter);
+ layout = new QVBoxLayout(upper_vbox);
+
Q_CHECK_PTR( lower_vbox );
- addVSpacing( lower_vbox, MARGIN );
+ layout->addSpacing( MARGIN );
_diskUsageList = new YQPkgDiskUsageList( lower_vbox );
Q_CHECK_PTR( _diskUsageList );
+ layout->addWidget(_diskUsageList);
splitter->setStretchFactor( 0, 0 );
splitter->setStretchFactor( 0, 1 );
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org