package selector semi working!
authordmacvicar <dmacvicar@e0cc52ee-31ee-0310-8b87-e83c4596d67c>
Fri, 7 Dec 2007 16:26:46 +0000 (16:26 +0000)
committerdmacvicar <dmacvicar@e0cc52ee-31ee-0310-8b87-e83c4596d67c>
Fri, 7 Dec 2007 16:26:46 +0000 (16:26 +0000)
git-svn-id: http://svn.opensuse.org/svn/yast/trunk/qt4@42825 e0cc52ee-31ee-0310-8b87-e83c4596d67c

src/pkg/YQPkgLangList.cc
src/pkg/YQPkgList.cc
src/pkg/YQPkgObjList.cc
src/pkg/YQPkgPatternList.cc

index f8662d5..2f3f03d 100644 (file)
@@ -36,17 +36,17 @@ YQPkgLangList::YQPkgLangList( QWidget * parent )
     y2debug( "Creating language list" );
 
     int numCol = 0;
-#if FIXME
-    addColumn( ""              );      _statusCol      = numCol++;
+    QStringList headers;
+    headers <<  "";    _statusCol      = numCol++;
 
     // Translators: Table column heading for language ISO code like "de_DE", "en_US"
     // Please keep this short to avoid stretching the column too wide!
-    addColumn( _( "Code"       ) );    _nameCol        = numCol++;
+    headers <<  _( "Code"      );      _nameCol        = numCol++;
 
     // Full (human readable) language / country name like "German (Austria)"
-    addColumn( _( "Language" ) );      _summaryCol     = numCol++;
+    headers <<  _( "Language");        _summaryCol     = numCol++;
     setAllColumnsShowFocus( true );
-#endif
+    setHeaderLabels(headers);
 
     connect( this,     SIGNAL( currentItemChanged        ( QTreeWidgetItem *, QTreeWidgetItem * ) ),
             this,      SLOT  ( filter()                                    ) );
index f2011f6..967c8bc 100644 (file)
@@ -42,38 +42,40 @@ YQPkgList::YQPkgList( QWidget * parent )
     _srpmStatusCol     = -42;
 
     int numCol = 0;
-#if FIXME
-    addColumn( "" );                   _statusCol      = numCol++;
+    QStringList headers;
+
+    
+    headers <<  "";                    _statusCol      = numCol++;
     // _statusCol = numCol;
-    addColumn( _( "Package"    ) );    _nameCol        = numCol++;
+    headers <<  _( "Package"   );      _nameCol        = numCol++;
 
-    addColumn( _( "Summary"    ) );    _summaryCol     = numCol++;
-    addColumn( _( "Size"       ) );    _sizeCol        = numCol++;
+    headers <<  _( "Summary"   );      _summaryCol     = numCol++;
+    headers <<  _( "Size"      );      _sizeCol        = numCol++;
 
     if ( haveInstalledPkgs() )
     {
-       addColumn( _( "Avail. Ver." ) ); _versionCol     = numCol++;
-       addColumn( _( "Inst. Ver."  ) ); _instVersionCol = numCol++;
+       headers << _( "Avail. Ver." ); _versionCol       = numCol++;
+       headers <<  _( "Inst. Ver."  ); _instVersionCol = numCol++;
     }
     else
     {
-       addColumn( _( "Version" ) );    _versionCol     = numCol++;
+       headers <<   _( "Version"       );      _versionCol     = numCol++;
        _instVersionCol = -1;
     }
 
 #if SOURCE_RPM_DISABLED
 #warning Selecting source RPMs disabled!
 #else
-    addColumn( _( "Source" ) );                _srpmStatusCol  = numCol++;
+    headers <<  _( "Source" );         _srpmStatusCol  = numCol++;
 #endif
-
+    setHeaderLabels(headers);
     saveColumnWidths();
-    setSorting( nameCol() );
-    setColumnAlignment( sizeCol(), Qt::AlignRight );
+    //FIXME sort( nameCol() );
+    //FIXME setColumnAlignment( sizeCol(), Qt::AlignRight );
     setAllColumnsShowFocus( true );
 
     createActions();
-#endif
+
     createSourceRpmContextMenu();
 }
 
index bd76f4b..4cc77b4 100644 (file)
@@ -47,7 +47,22 @@ YQPkgObjList::YQPkgObjList( QWidget * parent )
     : QY2ListView( parent )
     , _editable( true )
     , _installedContextMenu(0)
-    , _notInstalledContextMenu(0)
+    , _notInstalledContextMenu(0),
+    actionSetCurrentInstall(0L),
+    actionSetCurrentDontInstall(0L),
+    actionSetCurrentKeepInstalled(0L),
+    actionSetCurrentDelete(0L),
+    actionSetCurrentUpdate(0L),
+    actionSetCurrentTaboo(0L),
+    actionSetCurrentProtected(0L),
+    actionSetListInstall(0L),
+    actionSetListDontInstall(0L),
+    actionSetListKeepInstalled(0L),
+    actionSetListDelete(0L),
+    actionSetListUpdate(0L),
+    actionSetListUpdateForce(0L),
+    actionSetListTaboo(0L),
+    actionSetListProtected(0L)
 {
     // This class does not add any columns. This is the main reason why this is
     // an abstract base class: It doesn't know which columns are desired and in
index 37d4341..d2bfc94 100644 (file)
@@ -46,7 +46,6 @@ YQPkgPatternList::YQPkgPatternList( QWidget * parent, bool autoFill, bool autoFi
     y2debug( "Creating pattern list" );
 
     int numCol = 0;
-#if FIXME
     QStringList headers;
     headers << "";     _statusCol      = numCol++;
 
@@ -66,11 +65,11 @@ YQPkgPatternList::YQPkgPatternList( QWidget * parent, bool autoFill, bool autoFi
     _satisfiedIconCol  = _summaryCol;
     _brokenIconCol     = _summaryCol;
 
-    header()->setStretchEnabled( _statusCol , false );
-    header()->setStretchEnabled( _summaryCol, true  );
+//     header()->setStretchEnabled( _statusCol , false );
+//     header()->setStretchEnabled( _summaryCol, true  );
 
     setAllColumnsShowFocus( true );
-    setTreeStepSize( 0 );
+    //setTreeStepSize( 0 );
 
     if ( autoFilter )
     {
@@ -83,7 +82,6 @@ YQPkgPatternList::YQPkgPatternList( QWidget * parent, bool autoFill, bool autoFi
        fillList();
        selectSomething();
     }
-#endif
     y2debug( "Creating pattern list done" );
 }