43 #define YUILogComponent "qt-pkg"
46 #include <zypp/ZYppFactory.h>
47 #include <zypp/Resolver.h>
51 #include "YQPkgSelList.h"
59 yuiDebug() <<
"Creating selection list" << endl;
63 addColumn(
"" ); _statusCol = numCol++;
64 addColumn( _(
"Selection" ) ); _summaryCol = numCol++;
65 setAllColumnsShowFocus(
true );
68 _satisfiedIconCol = _summaryCol;
69 _brokenIconCol = _summaryCol;
83 yuiDebug() <<
"Creating selection list done" << endl;
97 yuiDebug() <<
"Filling selection list" << endl;
100 for ( ZyppPoolIterator it = zyppSelectionsBegin();
101 it != zyppSelectionsEnd();
104 ZyppSelection zyppSelection = tryCastToZyppSelection( (*it)->theObj() );
108 if ( zyppSelection->visible() && ! zyppSelection->isBase() )
115 yuiError() <<
"Found non-Selection selectable" << endl;
119 yuiDebug() <<
"Selection list filled" << endl;
142 set<string> wanted = zyppSelection->install_packages();
144 for ( ZyppPoolIterator it = zyppPkgBegin();
148 string name = (*it)->theObj()->name();
150 if ( contains( wanted, name ) )
152 ZyppPkg zyppPkg = tryCastToZyppPkg( (*it)->theObj() );
169 ZyppSelection zyppSelection )
173 yuiError() <<
"NULL ZyppSel!" << endl;
186 QTreeWidgetItem * item = selectedItem();
204 ZyppSelection zyppSelection )
206 , _pkgSelList( pkgSelList )
207 , _zyppSelection( zyppSelection )
209 if ( ! _zyppSelection )
210 _zyppSelection = tryCastToZyppSelection( selectable->theObj() );
212 QString text = fromUTF8( _zyppSelection->summary() );
215 text.replace( QRegExp(
"Graphical Basis System" ),
"Graphical Base System" );
216 text.replace( QRegExp(
"Gnome" ),
"GNOME" );
247 bool ascending )
const
251 if ( ! _zyppSelection || ! other || ! other->
zyppSelection() )
254 return _zyppSelection->order().compare( other->
zyppSelection()->order() );
259 #include "YQPkgSelList.moc"