more porting and make files use qt3support one by one
authordmacvicar <dmacvicar@e0cc52ee-31ee-0310-8b87-e83c4596d67c>
Thu, 6 Dec 2007 11:55:39 +0000 (11:55 +0000)
committerdmacvicar <dmacvicar@e0cc52ee-31ee-0310-8b87-e83c4596d67c>
Thu, 6 Dec 2007 11:55:39 +0000 (11:55 +0000)
git-svn-id: http://svn.opensuse.org/svn/yast/branches/tmp/coolo/qt4-port@42754 e0cc52ee-31ee-0310-8b87-e83c4596d67c

32 files changed:
src/pkg/CMakeLists.txt
src/pkg/YQPackageSelector.cc
src/pkg/YQPackageSelectorBase.cc
src/pkg/YQPatternSelector.cc
src/pkg/YQPkgChangesDialog.cc
src/pkg/YQPkgConflictDialog.cc
src/pkg/YQPkgConflictList.cc
src/pkg/YQPkgConflictList.h
src/pkg/YQPkgDescriptionDialog.cc
src/pkg/YQPkgDescriptionView.cc
src/pkg/YQPkgDiskUsageList.cc
src/pkg/YQPkgDiskUsageWarningDialog.cc
src/pkg/YQPkgGenericDetailsView.cc
src/pkg/YQPkgLangList.cc
src/pkg/YQPkgList.cc
src/pkg/YQPkgList.h
src/pkg/YQPkgObjList.cc
src/pkg/YQPkgObjList.h
src/pkg/YQPkgPatchFilterView.cc
src/pkg/YQPkgPatchList.cc
src/pkg/YQPkgPatternList.cc
src/pkg/YQPkgProductDialog.cc
src/pkg/YQPkgRepoList.cc
src/pkg/YQPkgRpmGroupTagsFilterView.cc
src/pkg/YQPkgRpmGroupTagsFilterView.h
src/pkg/YQPkgSearchFilterView.cc
src/pkg/YQPkgSelDescriptionView.cc
src/pkg/YQPkgSelList.cc
src/pkg/YQPkgTechnicalDetailsView.cc
src/pkg/YQPkgTextDialog.cc
src/pkg/YQPkgVersionsView.cc
src/pkg/YQSimplePatchSelector.cc

index bc280a5..01ed32b 100644 (file)
@@ -8,7 +8,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CUR
 
 ADD_DEFINITIONS(
 -DY2LOG=\\\"QT4\\\" ${QT_DEFINITIONS}
--DQT3_SUPPORT
+#-DQT3_SUPPORT
 -DICONDIR=\\"${Y2QT_ICONDIR}\\"
 -DLOCALEDIR=\\\"${Y2QT_LOCALEDIR}\\\"
 -DTHEMEDIR=\\\"${Y2QT_THEMEDIR}\\\"
index 88f2e2f..8fd6ac9 100644 (file)
@@ -19,6 +19,8 @@
 
 /-*/
 
+#define QT3_SUPPORT 1
+
 #define CHECK_DEPENDENCIES_ON_STARTUP                  1
 #define DEPENDENCY_FEEDBACK_IF_OK                      1
 #define AUTO_CHECK_DEPENDENCIES_DEFAULT                        true
@@ -488,7 +490,7 @@ YQPackageSelector::layoutDetailsViews( QWidget *parent )
     _detailsViews->addTab( _pkgDescriptionView, _( "D&escription" ) );
     _detailsViews->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); // hor/vert
 
-    connect( _pkgList,                 SIGNAL( selectionChanged    ( ZyppSel ) ),
+    connect( _pkgList,                 SIGNAL( currentItemChanged    ( ZyppSel ) ),
             _pkgDescriptionView,       SLOT  ( showDetailsIfVisible( ZyppSel ) ) );
 
     //
@@ -500,7 +502,7 @@ YQPackageSelector::layoutDetailsViews( QWidget *parent )
 
     _detailsViews->addTab( _pkgTechnicalDetailsView, _( "&Technical Data" ) );
 
-    connect( _pkgList,                 SIGNAL( selectionChanged    ( ZyppSel ) ),
+    connect( _pkgList,                 SIGNAL( currentItemChanged    ( ZyppSel ) ),
             _pkgTechnicalDetailsView,  SLOT  ( showDetailsIfVisible( ZyppSel ) ) );
 
 
@@ -514,7 +516,7 @@ YQPackageSelector::layoutDetailsViews( QWidget *parent )
     _detailsViews->addTab( _pkgDependenciesView, _( "Dependencies" ) );
     _detailsViews->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); // hor/vert
 
-    connect( _pkgList,                 SIGNAL( selectionChanged    ( ZyppSel ) ),
+    connect( _pkgList,                 SIGNAL( currentItemChanged    ( ZyppSel ) ),
             _pkgDependenciesView,      SLOT  ( showDetailsIfVisible( ZyppSel ) ) );
 
 
@@ -529,7 +531,7 @@ YQPackageSelector::layoutDetailsViews( QWidget *parent )
 
     _detailsViews->addTab( _pkgVersionsView, _( "&Versions" ) );
 
-    connect( _pkgList,         SIGNAL( selectionChanged    ( ZyppSel ) ),
+    connect( _pkgList,         SIGNAL( currentItemChanged    ( ZyppSel ) ),
             _pkgVersionsView,  SLOT  ( showDetailsIfVisible( ZyppSel ) ) );
 
 
@@ -545,7 +547,7 @@ YQPackageSelector::layoutDetailsViews( QWidget *parent )
        _detailsViews->addTab( _pkgFileListView, _( "File List" ) );
        _detailsViews->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); // hor/vert
 
-       connect( _pkgList,              SIGNAL( selectionChanged    ( ZyppSel ) ),
+       connect( _pkgList,              SIGNAL( currentItemChanged    ( ZyppSel ) ),
                 _pkgFileListView,      SLOT  ( showDetailsIfVisible( ZyppSel ) ) );
     }
 
@@ -562,7 +564,7 @@ YQPackageSelector::layoutDetailsViews( QWidget *parent )
        _detailsViews->addTab( _pkgChangeLogView, _( "Change Log" ) );
        _detailsViews->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); // hor/vert
 
-       connect( _pkgList,              SIGNAL( selectionChanged    ( ZyppSel ) ),
+       connect( _pkgList,              SIGNAL( currentItemChanged    ( ZyppSel ) ),
                 _pkgChangeLogView,     SLOT  ( showDetailsIfVisible( ZyppSel ) ) );
     }
 }
@@ -1131,7 +1133,7 @@ YQPackageSelector::pkgExport()
 
            // The export might have left over a partially written file.
            // Try to delete it. Don't care if it doesn't exist and unlink() fails.
-           (void) unlink( (const char *) filename );
+           QFile::remove(filename);
 
            // Post error popup
            QMessageBox::warning( this,                                         // parent
@@ -1154,7 +1156,7 @@ YQPackageSelector::pkgImport()
 
     if ( ! filename.isEmpty() )
     {
-       y2milestone( "Importing package list from %s", (const char *) filename );
+       y2milestone( "Importing package list from %s", qPrintable(filename) );
 
        try
        {
@@ -1184,7 +1186,7 @@ YQPackageSelector::pkgImport()
            y2debug( "Found %zu packages and %zu patterns in %s",
                     importPkg.size(),
                     importPatterns.size(),
-                    (const char *) filename );
+                    qPrintable(filename) );
 
 
            //
@@ -1225,7 +1227,7 @@ YQPackageSelector::pkgImport()
        }
        catch ( const zypp::Exception & exception )
        {
-           y2warning( "Error reading package list from %s", (const char *) filename );
+           y2warning( "Error reading package list from %s", qPrintable(filename) );
 
            // Post error popup
            QMessageBox::warning( this,                                         // parent
@@ -1378,18 +1380,19 @@ YQPackageSelector::installDebugInfoPkgs()
 void
 YQPackageSelector::pkgExcludeRulesChanged( int menuItemID )
 {
-    if ( _viewMenu && _pkgList )
-    {
-       _viewMenu->setItemChecked( menuItemID, ! _viewMenu->isItemChecked( menuItemID ) );
-
-       if ( _excludeDevelPkgs )
-           _excludeDevelPkgs->enable( ! _viewMenu->isItemChecked( _viewShowDevelID ) );
-
-       if ( _excludeDebugInfoPkgs )
-           _excludeDebugInfoPkgs->enable( ! _viewMenu->isItemChecked( _viewShowDebugInfoID ) );
-
-       _pkgList->applyExcludeRules();
-    }
+//FIXME
+//     if ( _viewMenu && _pkgList )
+//     {
+//     _viewMenu->setItemChecked( menuItemID, ! _viewMenu->isItemChecked( menuItemID ) );
+// 
+//     if ( _excludeDevelPkgs )
+//         _excludeDevelPkgs->enable( ! _viewMenu->isItemChecked( _viewShowDevelID ) );
+// 
+//     if ( _excludeDebugInfoPkgs )
+//         _excludeDebugInfoPkgs->enable( ! _viewMenu->isItemChecked( _viewShowDebugInfoID ) );
+// 
+//     _pkgList->applyExcludeRules();
+//     }
 }
 
 
@@ -1410,7 +1413,7 @@ YQPackageSelector::installSubPkgs( const QString suffix )
        {
            subPkgs[ name ] = *it;
 
-           y2debug( "Found subpackage: %s", (const char *) name );
+           y2debug( "Found subpackage: %s", qPrintable(name) );
        }
     }
 
@@ -1436,7 +1439,7 @@ YQPackageSelector::installSubPkgs( const QString suffix )
                case S_Taboo:
                case S_Del:
                    // Don't install the subpackage
-                   y2milestone( "Ignoring unwanted subpackage %s", (const char *) subPkgName );
+                   y2milestone( "Ignoring unwanted subpackage %s", qPrintable(subPkgName) );
                    break;
 
                case S_AutoInstall:
@@ -1448,7 +1451,7 @@ YQPackageSelector::installSubPkgs( const QString suffix )
                    if ( ! subPkg->installedObj() )
                    {
                        subPkg->set_status( S_Install );
-                       y2milestone( "Installing subpackage %s", (const char *) subPkgName );
+                       y2milestone( "Installing subpackage %s", qPrintable(subPkgName) );
                    }
                    break;
 
@@ -1461,12 +1464,12 @@ YQPackageSelector::installSubPkgs( const QString suffix )
                    if ( ! subPkg->installedObj() )
                    {
                        subPkg->set_status( S_Install );
-                       y2milestone( "Installing subpackage %s", (const char *) subPkgName );
+                       y2milestone( "Installing subpackage %s", qPrintable(subPkgName) );
                    }
                    else
                    {
                        subPkg->set_status( S_Update );
-                       y2milestone( "Updating subpackage %s", (const char *) subPkgName );
+                       y2milestone( "Updating subpackage %s", qPrintable(subPkgName) );
                    }
                    break;
 
index 121125c..74bf98e 100644 (file)
@@ -374,9 +374,9 @@ YQPackageSelectorBase::keyPressEvent( QKeyEvent * event )
 {
     if ( event )
     {
-       unsigned special_combo = ( Qt::ControlButton | Qt::ShiftButton | Qt::AltButton );
+       unsigned special_combo = ( Qt::ControlModifier | Qt::ShiftModifier | Qt::AltModifier );
 
-       if ( ( event->state() & special_combo ) == special_combo )
+       if ( ( event->modifiers() & special_combo ) == special_combo )
        {
            if ( event->key() == Qt::Key_A )
            {
index 5f215df..74ad080 100644 (file)
@@ -19,6 +19,8 @@
 
 /-*/
 
+#define QT3_SUPPORT 1
+
 #include <qapplication.h>
 #include <q3hbox.h>
 #include <q3header.h>
@@ -286,7 +288,7 @@ YQPatternSelector::makeConnections()
 
        if ( _descriptionView )
        {
-           connect( _patternList,      SIGNAL( selectionChanged( ZyppSel ) ),
+           connect( _patternList,      SIGNAL( currentItemChanged( ZyppSel ) ),
                     _descriptionView,  SLOT  ( showDetails     ( ZyppSel ) ) );
        }
 
@@ -314,7 +316,7 @@ YQPatternSelector::makeConnections()
 
        if ( _descriptionView )
        {
-           connect( _selList,          SIGNAL( selectionChanged( ZyppSel ) ),
+           connect( _selList,          SIGNAL( currentItemChanged( ZyppSel ) ),
                     _descriptionView,  SLOT  ( showDetails     ( ZyppSel ) ) );
        }
 
index 9b30b87..8be0e0e 100644 (file)
@@ -18,6 +18,7 @@
 
 /-*/
 
+#define QT3_SUPPORT 1
 
 #define y2log_component "qt-pkg"
 #include <ycp/y2log.h>
index dbb7f2e..e8a59e1 100644 (file)
@@ -18,6 +18,7 @@
 
 /-*/
 
+#define QT3_SUPPORT 1
 
 #define y2log_component "qt-pkg"
 #include <ycp/y2log.h>
index a473f3e..e7d9596 100644 (file)
@@ -18,6 +18,7 @@
 
 /-*/
 
+#define QT3_SUPPORT 1
 
 #include <qpainter.h>
 #include <qpixmap.h>
@@ -361,18 +362,18 @@ YQPkgConflict::addSolutions()
 }
 
 
-void
-YQPkgConflict::paintCell( QPainter *           painter,
-                         const QColorGroup &   colorGroup,
-                         int                   column,
-                         int                   width,
-                         int                   alignment )
-{
-    painter->setFont( YQUI::yqApp()->headingFont() );
-#if FIXME
-    QY2ListViewItem::paintCell( painter, colorGroup, column, width, alignment );
-#endif
-}
+// void
+// YQPkgConflict::paintCell( QPainter *                painter,
+//                       const QColorGroup &   colorGroup,
+//                       int                   column,
+//                       int                   width,
+//                       int                   alignment )
+// {
+//     painter->setFont( YQUI::yqApp()->headingFont() );
+// #if FIXME
+//     QY2ListViewItem::paintCell( painter, colorGroup, column, width, alignment );
+// #endif
+// }
 
 
 zypp::ProblemSolution_Ptr
index e59b0d4..c962afc 100644 (file)
@@ -179,11 +179,11 @@ protected:
      *
      * Reimplemented from QY2ListViewItem.
      **/
-    virtual void paintCell( QPainter *         painter,
-                           const QColorGroup & colorGroup,
-                           int                 column,
-                           int                 width,
-                           int                 alignment );
+//     virtual void paintCell( QPainter *              painter,
+//                         const QColorGroup & colorGroup,
+//                         int                 column,
+//                         int                 width,
+//                         int                 alignment );
 
 
     // Data members
index 3d37644..708f372 100644 (file)
@@ -18,6 +18,7 @@
 
 /-*/
 
+#define QT3_SUPPORT 1
 
 #define y2log_component "qt-pkg"
 #include <ycp/y2log.h>
@@ -82,7 +83,7 @@ YQPkgDescriptionDialog::YQPkgDescriptionDialog( QWidget * parent, const QString
     Q_CHECK_PTR( _pkgDescription );
     _pkgDescription->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); // hor/vert
 
-    connect( _pkgList,         SIGNAL( selectionChanged    ( ZyppSel ) ),
+    connect( _pkgList,         SIGNAL( currentItemChanged    ( ZyppSel ) ),
             _pkgDescription,   SLOT  ( showDetailsIfVisible( ZyppSel ) ) );
 
 
index 5682dda..6073aa8 100644 (file)
@@ -16,6 +16,8 @@
 
 /-*/
 
+#define QT3_SUPPORT 1
+
 #define y2log_component "qt-pkg"
 #include <ycp/y2log.h>
 
index ae8a294..439ee8e 100644 (file)
@@ -18,6 +18,8 @@
 
 /-*/
 
+#define QT3_SUPPORT 1
+
 #define y2log_component "qt-pkg"
 #include <ycp/y2log.h>
 
index 3df60e5..72aa528 100644 (file)
@@ -18,6 +18,7 @@
 
 /-*/
 
+#define QT3_SUPPORT 1
 
 #define y2log_component "qt-pkg"
 #include <ycp/y2log.h>
index 2c741bb..0132fb5 100644 (file)
@@ -16,6 +16,8 @@
 
 /-*/
 
+#define QT3_SUPPORT 1
+
 #define y2log_component "qt-pkg"
 #include <ycp/y2log.h>
 #include <qtabwidget.h>
index 81c3d1d..f8662d5 100644 (file)
@@ -48,7 +48,7 @@ YQPkgLangList::YQPkgLangList( QWidget * parent )
     setAllColumnsShowFocus( true );
 #endif
 
-    connect( this,     SIGNAL( selectionChanged        ( Q3ListViewItem * ) ),
+    connect( this,     SIGNAL( currentItemChanged        ( QTreeWidgetItem *, QTreeWidgetItem * ) ),
             this,      SLOT  ( filter()                                    ) );
 
     fillList();
index e208fee..c905c37 100644 (file)
@@ -18,6 +18,8 @@
 
 /-*/
 
+#define QT3_SUPPORT 1
+
 #define SOURCE_RPM_DISABLED 0
 
 #define y2log_component "qt-pkg"
index 04e9495..fdfa224 100644 (file)
@@ -151,8 +151,8 @@ public slots:
     void setDontInstallListSourceRpms()          { setInstallListSourceRpms( false ); }
 
 
-    // No separate selectionChanged( ZyppPkg ) signal:
-    // Use YQPkgObjList::selectionChanged( ZyppObj ) instead
+    // No separate currentItemChanged( ZyppPkg ) signal:
+    // Use YQPkgObjList::currentItemChanged( ZyppObj ) instead
     // and dynamic_cast to ZyppPkg if required.
     // This saves duplicating a lot of code.
 
index fd69de1..fbcdc61 100644 (file)
@@ -18,6 +18,8 @@
 
 /-*/
 
+#define QT3_SUPPORT 1
+
 #define y2log_component "qt-pkg"
 #include <ycp/y2log.h>
 #include <QPixmap>
@@ -73,8 +75,8 @@ YQPkgObjList::YQPkgObjList( QWidget * parent )
     connect( this,     SIGNAL( columnDoubleClicked     ( int, QTreeWidgetItem *, int, const QPoint & ) ),
             this,      SLOT  ( pkgObjClicked           ( int, QTreeWidgetItem *, int, const QPoint & ) ) );
 
-    connect( this,     SIGNAL( selectionChanged        ( QTreeWidgetItem * ) ),
-            this,      SLOT  ( selectionChangedInternal( QTreeWidgetItem * ) ) );
+    connect( this,     SIGNAL( currentItemChanged      ( QTreeWidgetItem *, QTreeWidgetItem * ) ),
+            this,      SLOT  ( currentItemChangedInternal( QTreeWidgetItem * ) ) );
 }
 
 
@@ -158,18 +160,18 @@ YQPkgObjList::pkgObjClicked( int          button,
 
 
 void
-YQPkgObjList::selectionChangedInternal( QTreeWidgetItem * listViewItem )
+YQPkgObjList::currentItemChangedInternal( QTreeWidgetItem * listViewItem )
 {
     YQPkgObjListItem * item = dynamic_cast<YQPkgObjListItem *> (listViewItem);
 
-    emit selectionChanged( item ? item->selectable() : ZyppSel() );
+    emit currentItemChanged( item ? item->selectable() : ZyppSel() );
 }
 
 
 void
 YQPkgObjList::clear()
 {
-    emit selectionChanged( ZyppSel() );
+    emit currentItemChanged( ZyppSel() );
 
     _excludedItems->clear();
     QY2ListView::clear();
index 54f7fa3..d8c399b 100644 (file)
@@ -58,7 +58,7 @@ protected:
     virtual ~YQPkgObjList();
 
     // avoiding warning about virtuals
-    using QTreeView::selectionChanged;
+    using QTreeWidget::currentItemChanged;
 
 public:
 
@@ -184,7 +184,7 @@ public slots:
 
     /**
      * Reimplemented from QY2ListView:
-     * Emit selectionChanged() signal after clearing the list.
+     * Emit currentItemChanged() signal after clearing the list.
      **/
     virtual void clear();
 
@@ -248,7 +248,7 @@ protected slots:
     /**
      * Dispatcher slot for selection change - internal only.
      **/
-    virtual void selectionChangedInternal( QTreeWidgetItem * item );
+    virtual void currentItemChangedInternal( QTreeWidgetItem * item );
 
 signals:
 
@@ -257,7 +257,7 @@ signals:
      * Emitted when a zypp::ui::Selectable is selected.
      * May be called with a null poiner if no zypp::ResObject is selected.
      **/
-    void selectionChanged( ZyppSel selectable );
+    void currentItemChanged( ZyppSel selectable );
 
     /**
      * Emitted when the status of a zypp::ResObject is changed.
index add9b1d..4754e15 100644 (file)
@@ -18,6 +18,7 @@
 
 /-*/
 
+#define QT3_SUPPORT 1
 
 #define y2log_component "qt-pkg"
 #include <ycp/y2log.h>
@@ -114,7 +115,7 @@ YQPkgPatchFilterView::YQPkgPatchFilterView( QWidget * parent )
 #endif
 
 
-    connect( _patchList,       SIGNAL( selectionChanged    ( ZyppSel ) ),
+    connect( _patchList,       SIGNAL( currentItemChanged    ( ZyppSel ) ),
             _descriptionView,  SLOT  ( showDetailsIfVisible( ZyppSel ) ) );
 
     connect( _patchList,       SIGNAL( statusChanged()                 ),
index fb6ee09..c58d002 100644 (file)
@@ -18,6 +18,7 @@
 
 /-*/
 
+#define QT3_SUPPORT 1
 
 #define y2log_component "qt-pkg"
 #include <ycp/y2log.h>
@@ -70,7 +71,7 @@ YQPkgPatchList::YQPkgPatchList( QWidget * parent )
     setAllColumnsShowFocus( true );
     setColumnAlignment( sizeCol(), Qt::AlignRight );
 
-    connect( this,     SIGNAL( selectionChanged        ( QTreeWidgetItem * ) ),
+    connect( this,     SIGNAL( currentItemChanged      ( QTreeWidgetItem * ) ),
             this,      SLOT  ( filter()                                    ) );
 
     setSorting( categoryCol() );
@@ -92,9 +93,9 @@ YQPkgPatchList::polish()
 {
     // Delayed initialization after widget is fully created etc.
 
-    // Only now send selectionChanged() signal so attached details views also
+    // Only now send currentItemChanged() signal so attached details views also
     // display something if their showDetailsIfVisible() slot is connected to
-    // selectionChanged() signals.
+    // currentItemChanged() signals.
     selectSomething();
 }
 
index 9a4da5b..e40ea52 100644 (file)
 
 /-*/
 
+#define QT3_SUPPORT 1
 
 #define y2log_component "qt-pkg"
 #include <ycp/y2log.h>
-#include <qregexp.h>
+#include <QRegExp>
 #include <zypp/ZYppFactory.h>
 #include <zypp/Resolver.h>
-#include <qpainter.h>
-#include <q3header.h>
+#include <QPainter>
+#include <QHeaderView>
 #include <zypp/ui/PatternContents.h>
 
 #include "YQi18n.h"
@@ -46,7 +47,8 @@ YQPkgPatternList::YQPkgPatternList( QWidget * parent, bool autoFill, bool autoFi
 
     int numCol = 0;
 #if FIXME
-    addColumn( ""              );      _statusCol      = numCol++;
+    QStringList headers;
+    headers << "";     _statusCol      = numCol++;
 
     // Translators: "Pattern" refers to so-called "installation patterns",
     // i.e., specific task-oriented groups of packages, like "everything that
@@ -55,8 +57,9 @@ YQPkgPatternList::YQPkgPatternList( QWidget * parent, bool autoFill, bool autoFi
     // configuring the web server. For the scope of the package selector, this
     // is only of little relevance, though.
 
-    addColumn( _( "Pattern" )  );      _summaryCol     = numCol++;
+    headers << _( "Pattern" ); _summaryCol     = numCol++;
 
+    setHeaderLabels(headers);
     // Can use the same colum for "broken" and "satisfied":
     // Both states are mutually exclusive
 
@@ -71,7 +74,7 @@ YQPkgPatternList::YQPkgPatternList( QWidget * parent, bool autoFill, bool autoFi
 
     if ( autoFilter )
     {
-       connect( this, SIGNAL( selectionChanged( QTreeWidgetItem * ) ),
+       connect( this, SIGNAL( currentItemChanged( QTreeWidgetItem * ) ),
                 this, SLOT  ( filter()                            ) );
     }
 
@@ -208,6 +211,7 @@ YQPkgPatternList::addPatternItem( ZyppSel   selectable,
     else
        item = new YQPkgPatternListItem( this, selectable, zyppPattern );
 
+    addTopLevelItem(item);
     applyExcludeRules( item );
 }
 
@@ -216,7 +220,7 @@ YQPkgPatternListItem *
 YQPkgPatternList::selection() const
 {
 #if FIXME
-    QTreeWidgetItem * item = selectedItem();
+    QTreeWidgetItem * item = currentItem();
 
     if ( ! item )
        return 0;
@@ -244,7 +248,7 @@ YQPkgPatternList::pkgObjClicked( int                        button,
        {
            if ( col == statusCol() )
            {
-               categoryItem->setOpen( ! categoryItem->isOpen() );
+               categoryItem->setOpen( ! categoryItem->isExpanded() );
            }
        }
     }
index 7914fcd..12cf60a 100644 (file)
@@ -18,6 +18,7 @@
 
 /-*/
 
+#define QT3_SUPPORT 1
 
 #define y2log_component "qt-pkg"
 #include <ycp/y2log.h>
@@ -94,7 +95,7 @@ YQPkgProductDialog::YQPkgProductDialog( QWidget * parent )
     _detailsViews->addTab( _dependenciesView, _( "Dependencies" ) );
     _dependenciesView->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); // hor/vert
 
-    connect( _productList,     SIGNAL( selectionChanged    ( ZyppSel ) ),
+    connect( _productList,     SIGNAL( currentItemChanged    ( ZyppSel ) ),
             _dependenciesView, SLOT  ( showDetailsIfVisible( ZyppSel ) ) );
 
 
@@ -127,7 +128,7 @@ YQPkgProductDialog::polish()
 {
     // Delayed initialization after widget is fully created etc.
 
-    // Only now send selectionChanged() signal so the details views display something
+    // Only now send currentItemChanged() signal so the details views display something
     // (showDetailsIfVisible() shows only something if the widget is visible,
     // as the method name implies)
     _productList->selectSomething();
index a858297..35af0be 100644 (file)
@@ -18,6 +18,7 @@
 
 /-*/
 
+#define QT3_SUPPORT 1
 
 #include <algorithm>
 #include <qdatetime.h>
@@ -54,7 +55,7 @@ YQPkgRepoList::YQPkgRepoList( QWidget * parent )
     setAllColumnsShowFocus( true );
     setSelectionMode( Q3ListView::Extended );  // allow multi-selection with Ctrl-mouse
 
-    connect( this,     SIGNAL( selectionChanged() ),
+    connect( this,     SIGNAL( currentItemChanged() ),
             this,      SLOT  ( filterIfVisible()) );
 
     fillList();
index dd39477..86cd441 100644 (file)
@@ -32,16 +32,16 @@ YRpmGroupsTree * YQPkgRpmGroupTagsFilterView::_rpmGroupsTree = 0;
 
 
 YQPkgRpmGroupTagsFilterView::YQPkgRpmGroupTagsFilterView( QWidget * parent )
-    : Q3ListView( parent )
+    : QTreeWidget( parent )
 {
-    addColumn( _( "Package Groups" ) );
+    setHeaderLabels( QStringList(_( "Package Groups" )) );
     setRootIsDecorated( true );
     cloneTree( rpmGroupsTree()->root(), 0 );
 
     new YQPkgRpmGroupTag( this, _( "zzz All" ), 0 );
 
-    connect( this, SIGNAL( selectionChanged     ( Q3ListViewItem * ) ),
-            this, SLOT  ( slotSelectionChanged ( Q3ListViewItem * ) ) );
+    connect( this, SIGNAL( currentItemChanged     ( QTreeWidgetItem *, QTreeWidgetItem * ) ),
+            this, SLOT  ( slotSelectionChanged ( QTreeWidgetItem * ) ) );
 
     selectSomething();
 }
@@ -101,8 +101,8 @@ YQPkgRpmGroupTagsFilterView::cloneTree( YStringTreeItem *   parentRpmGroup,
            clone = new YQPkgRpmGroupTag( this, child );
 
        Q_CHECK_PTR( clone );
-       clone->setOpen( clone->depth() < 1 );
-
+       //FIXME clone->setExpanded( clone->depth() < 1 );
+        clone->setExpanded( true );
        cloneTree( child, clone );
        child = child->next();
     }
@@ -112,10 +112,11 @@ YQPkgRpmGroupTagsFilterView::cloneTree( YStringTreeItem *         parentRpmGroup,
 void
 YQPkgRpmGroupTagsFilterView::selectSomething()
 {
-    Q3ListViewItem * item = firstChild();
-
-    if ( item )
-       setSelected( item, true );
+// FIXME
+//     QTreeWidgetItem * item = children().first();
+// 
+//     if ( item )
+//     setCurrentItem(item);
 }
 
 
@@ -168,7 +169,7 @@ YQPkgRpmGroupTagsFilterView::filter()
 
 
 void
-YQPkgRpmGroupTagsFilterView::slotSelectionChanged( Q3ListViewItem * newSelection )
+YQPkgRpmGroupTagsFilterView::slotSelectionChanged( QTreeWidgetItem * newSelection )
 {
     YQPkgRpmGroupTag * sel = dynamic_cast<YQPkgRpmGroupTag *>( newSelection );
 
@@ -218,12 +219,12 @@ YQPkgRpmGroupTagsFilterView::check( ZyppSel       selectable,
 YQPkgRpmGroupTag *
 YQPkgRpmGroupTagsFilterView::selection() const
 {
-    Q3ListViewItem * item = selectedItem();
+    QTreeWidgetItem * item = currentItem();
 
     if ( ! item )
        return 0;
 
-    return dynamic_cast<YQPkgRpmGroupTag *> ( selectedItem() );
+    return dynamic_cast<YQPkgRpmGroupTag *> ( item );
 }
 
 
@@ -233,7 +234,7 @@ YQPkgRpmGroupTagsFilterView::selection() const
 
 YQPkgRpmGroupTag::YQPkgRpmGroupTag( YQPkgRpmGroupTagsFilterView *      parentFilterView,
                                    YStringTreeItem *                   rpmGroup        )
-    : Q3ListViewItem( parentFilterView )
+    : QTreeWidgetItem( parentFilterView )
     , _filterView( parentFilterView )
     , _rpmGroup( rpmGroup )
 {
@@ -244,7 +245,7 @@ YQPkgRpmGroupTag::YQPkgRpmGroupTag( YQPkgRpmGroupTagsFilterView *   parentFilterV
 YQPkgRpmGroupTag::YQPkgRpmGroupTag( YQPkgRpmGroupTagsFilterView *      parentFilterView,
                                    YQPkgRpmGroupTag *                  parentGroupTag,
                                    YStringTreeItem *                   rpmGroup        )
-    : Q3ListViewItem( parentGroupTag )
+    : QTreeWidgetItem( parentGroupTag )
     , _filterView( parentFilterView )
     , _rpmGroup( rpmGroup )
 {
@@ -255,7 +256,7 @@ YQPkgRpmGroupTag::YQPkgRpmGroupTag( YQPkgRpmGroupTagsFilterView *   parentFilterV
 YQPkgRpmGroupTag::YQPkgRpmGroupTag( YQPkgRpmGroupTagsFilterView *      parentFilterView,
                                    const QString &                     rpmGroupName,
                                    YStringTreeItem *                   rpmGroup        )
-    : Q3ListViewItem( parentFilterView )
+    : QTreeWidgetItem( parentFilterView )
     , _filterView( parentFilterView )
     , _rpmGroup( rpmGroup )
 {
index 49720d6..0ad1d70 100644 (file)
@@ -21,7 +21,7 @@
 #define YQPkgRpmGroupTagsFilterView_h
 
 #include "YQZypp.h"
-#include <q3listview.h>
+#include <QTreeWidget>
 #include <YRpmGroupsTree.h>
 
 
@@ -35,7 +35,7 @@ class YQPkgRpmGroupTag;
  * signals if any group tag is selected so a package list can be filled or
  * updated.
  **/
-class YQPkgRpmGroupTagsFilterView : public Q3ListView
+class YQPkgRpmGroupTagsFilterView : public QTreeWidget
 {
     Q_OBJECT
 
@@ -89,7 +89,7 @@ public slots:
     /**
      * Select a list entry (if there is any).
      * Usually this will be the first list entry, but don't rely on that - this
-     * might change without notice. Emits signal selectionChanged().
+     * might change without notice. Emits signal currentItemChanged().
      **/
     void selectSomething();
 
@@ -125,7 +125,7 @@ protected slots:
     /**
      * Update _selectedRpmGroup and filter data
      **/
-    void slotSelectionChanged( Q3ListViewItem * newSelection );
+    void slotSelectionChanged( QTreeWidgetItem * newSelection );
 
 
 protected:
@@ -155,7 +155,7 @@ protected:
 
 
 
-class YQPkgRpmGroupTag: public Q3ListViewItem
+class YQPkgRpmGroupTag: public QTreeWidgetItem
 {
 public:
 
index 0bb5b12..ff8e652 100644 (file)
@@ -18,6 +18,8 @@
 
 /-*/
 
+#define QT3_SUPPORT 1
+
 #include <qcheckbox.h>
 #include <qcombobox.h>
 #include <qlabel.h>
index 2aab9fb..621c548 100644 (file)
@@ -16,6 +16,7 @@
 
 /-*/
 
+#define QT3_SUPPORT 1
 
 #define y2log_component "qt-pkg"
 #include <ycp/y2log.h>
index 989b2cd..980aa86 100644 (file)
@@ -48,7 +48,7 @@ YQPkgSelList::YQPkgSelList( QWidget * parent, bool autoFill, bool autoFilter )
 
     if ( autoFilter )
     {
-       connect( this, SIGNAL( selectionChanged( QTreeWidgetItem * ) ),
+       connect( this, SIGNAL( currentItemChanged( QTreeWidgetItem * ) ),
                 this, SLOT  ( filter()                            ) );
     }
 
index ce649cf..c1e5bfa 100644 (file)
@@ -18,6 +18,8 @@
 
 /-*/
 
+#define QT3_SUPPORT 1
+
 #define y2log_component "qt-pkg"
 #include <ycp/y2log.h>
 
index 3925a73..f588817 100644 (file)
@@ -18,6 +18,7 @@
 
 /-*/
 
+#define QT3_SUPPORT 1
 
 #define y2log_component "qt-pkg"
 #include <ycp/y2log.h>
index 40a24e8..a1a3df3 100644 (file)
@@ -18,6 +18,8 @@
 
 /-*/
 
+#define QT3_SUPPORT 1
+
 #define y2log_component "qt-pkg"
 
 #include <YQZypp.h>
@@ -75,7 +77,7 @@ YQPkgVersionsView::YQPkgVersionsView( QWidget * parent, bool userCanSwitch )
                 this,   SLOT  ( reload        (QWidget *) ) );
     }
 
-    connect( this,     SIGNAL( selectionChanged        () ),
+    connect( this,     SIGNAL( currentItemChanged      () ),
             this,      SLOT  ( checkForChangedCandidate() ) );
 }
 
index 3ba7bee..758fc76 100644 (file)
@@ -18,6 +18,8 @@
 
 /-*/
 
+#define QT3_SUPPORT 1
+
 #include <qapplication.h>
 #include <q3hbox.h>
 #include <q3header.h>