Author: dmacvicar
Date: Sat Dec 8 02:37:07 2007
New Revision: 42842
URL: http://svn.opensuse.org/viewcvs/yast?rev=42842&view=rev
Log:
YQPkgChangesDialog QT3_SUPPORT
Modified:
trunk/qt4/src/pkg/YQPkgChangesDialog.cc
Modified: trunk/qt4/src/pkg/YQPkgChangesDialog.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt4/src/pkg/YQPkgChangesDialog.cc?rev=42842&r1=42841&r2=42842&view=diff
==============================================================================
--- trunk/qt4/src/pkg/YQPkgChangesDialog.cc (original)
+++ trunk/qt4/src/pkg/YQPkgChangesDialog.cc Sat Dec 8 02:37:07 2007
@@ -23,15 +23,13 @@
#define y2log_component "qt-pkg"
#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-//Added by qt3to4:
-#include
+#include <QApplication>
+#include <QDesktopWidget>
+#include <QLabel>
+#include <QLayout>
+#include <QPushButton>
+#include <QStyle>
+#include <QBoxLayout>
#include "YQZypp.h"
#include
@@ -58,7 +56,7 @@
: QDialog( parent )
{
// Dialog title
- setCaption( _( "Changed Packages" ) );
+ setWindowTitle( _( "Changed Packages" ) );
// Enable dialog resizing even without window manager
setSizeGripEnabled( true );
@@ -68,32 +66,36 @@
// Layout for the dialog ( can't simply insert a QVBox )
- Q3VBoxLayout * layout = new Q3VBoxLayout( this, MARGIN, SPACING );
+ QVBoxLayout * layout = new QVBoxLayout( this );
Q_CHECK_PTR( layout );
-
+ layout->setMargin(MARGIN);
+ layout->setSpacing(SPACING);
+ setLayout(layout);
// HBox for icon and message
- Q3HBox * hbox = new Q3HBox( this );
+ QHBoxLayout * hbox = new QHBoxLayout( this );
Q_CHECK_PTR( hbox );
- layout->addWidget( hbox );
+ layout->addLayout( hbox );
// Icon
- addHSpacing( hbox );
- QLabel * iconLabel = new QLabel( hbox );
+ hbox->addSpacing(SPACING);
+ QLabel * iconLabel = new QLabel( this );
Q_CHECK_PTR( iconLabel );
+ hbox->addWidget(iconLabel);
#ifdef FIXME
iconLabel->setPixmap( QApplication::style().stylePixmap( QStyle::SP_MessageBoxInformation ) );
#endif
iconLabel->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) ); // hor/vert
- addHSpacing( hbox );
+ hbox->addSpacing(SPACING);
// Label for the message
- QLabel * label = new QLabel( message, hbox );
+ QLabel * label = new QLabel( message, this );
Q_CHECK_PTR( label );
+ hbox->addWidget(label);
label->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) ); // hor/vert
@@ -108,38 +110,39 @@
// Button box
- hbox = new Q3HBox( this );
+ hbox = new QHBoxLayout( this );
Q_CHECK_PTR( hbox );
hbox->setSpacing( SPACING );
hbox->setMargin ( MARGIN );
- layout->addWidget( hbox );
+ layout->addLayout( hbox );
- addHStretch( hbox );
+ hbox->addStretch();
// Accept button - usually "OK" or "Continue"
- QPushButton * button = new QPushButton( acceptButtonLabel, hbox );
+ QPushButton * button = new QPushButton( acceptButtonLabel, this );
Q_CHECK_PTR( button );
+ layout->addWidget( button );
button->setDefault( true );
connect( button, SIGNAL( clicked() ),
this, SLOT ( accept() ) );
- addHStretch( hbox );
+ hbox->addStretch();
if ( ! rejectButtonLabel.isEmpty() )
{
// Reject button ( if desired ) - usually "Cancel"
- button = new QPushButton( rejectButtonLabel, hbox );
+ button = new QPushButton( rejectButtonLabel, this );
Q_CHECK_PTR( button );
-
+ hbox->addWidget(button);
connect( button, SIGNAL( clicked() ),
this, SLOT ( reject() ) );
- addHStretch( hbox );
+ hbox->addStretch();
}
}
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org