42 #define YUILogComponent "qt-pkg"
45 #include <QHeaderView>
54 #include "YQPkgObjList.h"
55 #include "YQPkgTextDialog.h"
57 #include "YQIconPool.h"
60 #include "zypp/ZYppFactory.h"
67 #define VERBOSE_EXCLUDE_RULES 0
68 #define EXTRA_SOLVE_COLLECTIONS 0
72 : QY2ListView( parent )
74 , _installedContextMenu(0)
75 , _notInstalledContextMenu(0)
76 , actionSetCurrentInstall(0)
77 , actionSetCurrentDontInstall(0)
78 , actionSetCurrentKeepInstalled(0)
79 , actionSetCurrentDelete(0)
80 , actionSetCurrentUpdate(0)
81 , actionSetCurrentUpdateForce(0)
82 , actionSetCurrentTaboo(0)
83 , actionSetCurrentProtected(0)
84 , actionShowCurrentSolverInfo(0)
85 , actionSetListInstall(0)
86 , actionSetListDontInstall(0)
87 , actionSetListKeepInstalled(0)
88 , actionSetListDelete(0)
89 , actionSetListUpdate(0)
90 , actionSetListUpdateForce(0)
91 , actionSetListTaboo(0)
92 , actionSetListProtected(0)
102 _instVersionCol = -42;
105 _brokenIconCol = -42;
106 _satisfiedIconCol = -42;
113 connect(
this, SIGNAL( columnClicked (
int, QTreeWidgetItem *,
int,
const QPoint & ) ),
114 this, SLOT (
pkgObjClicked (
int, QTreeWidgetItem *,
int,
const QPoint & ) ) );
116 connect(
this, SIGNAL( columnDoubleClicked (
int, QTreeWidgetItem *,
int,
const QPoint & ) ),
117 this, SLOT (
pkgObjClicked (
int, QTreeWidgetItem *,
int,
const QPoint & ) ) );
122 connect(
this, SIGNAL(customContextMenuRequested(
const QPoint &)),
125 setIconSize( QSize( 22, 16 ) );
127 setContextMenuPolicy(Qt::CustomContextMenu);
136 if ( _excludedItems )
137 delete _excludedItems;
146 yuiError() <<
"Null zypp::ui::Selectable!" << endl;
157 const QString & summary,
160 QY2ListViewItem * item =
new QY2ListViewItem(
this, QString::null );
164 if ( nameCol() >= 0 && ! name.isEmpty() ) item->setText( nameCol(), name );
165 if ( summaryCol() >= 0 && ! summary.isEmpty() ) item->setText( summaryCol(), summary );
166 if ( sizeCol() >= 0 && size > 0L )
168 QString sizeStr = size.form().c_str();
169 item->setText( sizeCol(), sizeStr );
177 QTreeWidgetItem * listViewItem,
186 if ( button == Qt::LeftButton )
188 if ( col == statusCol() )
214 _excludedItems->
clear();
215 QY2ListView::clear();
222 QPixmap icon = YQIconPool::pkgNoInst();
228 case S_Del: icon = YQIconPool::pkgDel();
break;
229 case S_Install: icon = YQIconPool::pkgInstall();
break;
230 case S_KeepInstalled: icon = YQIconPool::pkgKeepInstalled();
break;
231 case S_NoInst: icon = YQIconPool::pkgNoInst();
break;
232 case S_Protected: icon = YQIconPool::pkgProtected();
break;
233 case S_Taboo: icon = YQIconPool::pkgTaboo();
break;
234 case S_Update: icon = YQIconPool::pkgUpdate();
break;
236 case S_AutoDel: icon = YQIconPool::pkgAutoDel();
break;
237 case S_AutoInstall: icon = YQIconPool::pkgAutoInstall();
break;
238 case S_AutoUpdate: icon = YQIconPool::pkgAutoUpdate();
break;
248 case S_Del: icon = YQIconPool::disabledPkgDel();
break;
249 case S_Install: icon = YQIconPool::disabledPkgInstall();
break;
250 case S_KeepInstalled: icon = YQIconPool::disabledPkgKeepInstalled();
break;
251 case S_NoInst: icon = YQIconPool::disabledPkgNoInst();
break;
252 case S_Protected: icon = YQIconPool::disabledPkgProtected();
break;
253 case S_Taboo: icon = YQIconPool::disabledPkgTaboo();
break;
254 case S_Update: icon = YQIconPool::disabledPkgUpdate();
break;
256 case S_AutoDel: icon = YQIconPool::disabledPkgAutoDel();
break;
257 case S_AutoInstall: icon = YQIconPool::disabledPkgAutoInstall();
break;
258 case S_AutoUpdate: icon = YQIconPool::disabledPkgAutoUpdate();
break;
274 case S_AutoDel:
return _(
"Autodelete" );
275 case S_AutoInstall:
return _(
"Autoinstall" );
276 case S_AutoUpdate:
return _(
"Autoupdate" );
277 case S_Del:
return _(
"Delete" );
278 case S_Install:
return _(
"Install" );
279 case S_KeepInstalled:
return _(
"Keep" );
280 case S_NoInst:
return _(
"Do Not Install" );
281 case S_Protected:
return _(
"Protected -- Do Not Modify" );
282 case S_Taboo:
return _(
"Taboo -- Never Install" );
283 case S_Update:
return _(
"Update" );
286 return QString::null;
293 QTreeWidgetItem * listViewItem = currentItem();
295 if ( ! listViewItem )
302 if ( newStatus != item->
status() )
320 if ( doSelectNextItem )
328 QTreeWidgetItem * listViewItem = currentItem();
330 if ( ! listViewItem )
348 YQUI::ui()->busyCursor();
349 QTreeWidgetItemIterator it(
this );
357 if ( newStatus == S_Update )
382 emit updateItemStates();
385 YQUI::ui()->normalCursor();
393 QTreeWidgetItemIterator it(
this);
394 QTreeWidgetItem * item;
396 while ( (item = *it) != NULL )
401 setCurrentItem( *it );
410 actionSetCurrentInstall =
createAction( S_Install,
"[+]" );
411 actionSetCurrentDontInstall =
createAction( S_NoInst,
"[-]" );
412 actionSetCurrentKeepInstalled =
createAction( S_KeepInstalled,
"[<], [-]" );
414 actionSetCurrentUpdate =
createAction( S_Update,
"[>], [+]" );
420 actionSetCurrentProtected =
createAction( S_Protected,
"[*]" );
422 actionShowCurrentSolverInfo =
createAction( _(
"Show solver information" ));
424 actionSetListInstall =
createAction( S_Install,
"",
true );
425 actionSetListDontInstall =
createAction( S_NoInst,
"",
true );
426 actionSetListKeepInstalled =
createAction( S_KeepInstalled,
"",
true );
428 actionSetListProtected =
createAction( S_Protected,
"",
true );
430 actionSetListUpdate =
createAction( _(
"Update if newer version available" ),
436 actionSetListUpdateForce =
createAction( _(
"Update unconditionally" ),
444 connect( actionSetCurrentInstall, SIGNAL( activated() ),
this, SLOT( setCurrentInstall() ) );
445 connect( actionSetCurrentDontInstall, SIGNAL( activated() ),
this, SLOT( setCurrentDontInstall() ) );
446 connect( actionSetCurrentKeepInstalled, SIGNAL( activated() ),
this, SLOT( setCurrentKeepInstalled() ) );
447 connect( actionSetCurrentDelete, SIGNAL( activated() ),
this, SLOT( setCurrentDelete() ) );
448 connect( actionSetCurrentUpdate, SIGNAL( activated() ),
this, SLOT( setCurrentUpdate() ) );
449 connect( actionSetCurrentUpdateForce, SIGNAL( activated() ),
this, SLOT( setCurrentUpdateForce() ) );
450 connect( actionSetCurrentTaboo, SIGNAL( activated() ),
this, SLOT( setCurrentTaboo() ) );
451 connect( actionSetCurrentProtected, SIGNAL( activated() ),
this, SLOT( setCurrentProtected() ) );
452 connect( actionShowCurrentSolverInfo, SIGNAL( activated() ),
this, SLOT( showCurrentSolverInfo() ) );
453 connect( actionSetListInstall, SIGNAL( activated() ),
this, SLOT( setListInstall() ) );
454 connect( actionSetListDontInstall, SIGNAL( activated() ),
this, SLOT( setListDontInstall() ) );
455 connect( actionSetListKeepInstalled, SIGNAL( activated() ),
this, SLOT( setListKeepInstalled() ) );
456 connect( actionSetListDelete, SIGNAL( activated() ),
this, SLOT( setListDelete() ) );
457 connect( actionSetListUpdate, SIGNAL( activated() ),
this, SLOT( setListUpdate() ) );
458 connect( actionSetListUpdateForce, SIGNAL( activated() ),
this, SLOT( setListUpdateForce() ) );
459 connect( actionSetListTaboo, SIGNAL( activated() ),
this, SLOT( setListTaboo() ) );
460 connect( actionSetListProtected, SIGNAL( activated() ),
this, SLOT( setListProtected() ) );
470 zypp::Target_Ptr target = zypp::getZYpp()->getTarget();
471 if ( ! target || ( target->root() !=
"/" ) )
476 if ( ! _plugin.success() )
479 yuiMilestone() <<
"Disabling solver info plugin: not available and no target or target is not /" << endl;
480 actionShowCurrentSolverInfo->setVisible(
false);
484 yuiMilestone() <<
"target not available or target or target is not /. Solver info plugin available anyway." << endl;
504 const QPixmap & icon,
505 const QPixmap & insensitiveIcon,
509 QString label = text;
511 if ( ! key.isEmpty() )
515 QIcon iconSet ( icon );
517 if ( ! insensitiveIcon.isNull() )
519 iconSet.addPixmap( insensitiveIcon,
523 QAction * action =
new QAction( label,
525 Q_CHECK_PTR( action );
526 action->setEnabled( enabled );
527 action->setIcon( iconSet );
536 _notInstalledContextMenu =
new QMenu(
this );
537 Q_CHECK_PTR( _notInstalledContextMenu );
539 _notInstalledContextMenu->addAction( actionSetCurrentInstall );
540 _notInstalledContextMenu->addAction( actionSetCurrentDontInstall );
541 _notInstalledContextMenu->addAction( actionSetCurrentTaboo );
542 _notInstalledContextMenu->addAction( actionShowCurrentSolverInfo );
551 _installedContextMenu =
new QMenu(
this );
552 Q_CHECK_PTR( _installedContextMenu );
554 _installedContextMenu->addAction( actionSetCurrentKeepInstalled );
555 _installedContextMenu->addAction( actionSetCurrentDelete );
556 _installedContextMenu->addAction( actionSetCurrentUpdate );
557 _installedContextMenu->addAction( actionSetCurrentUpdateForce );
558 _installedContextMenu->addAction( actionShowCurrentSolverInfo );
567 QMenu * submenu =
new QMenu( menu );
568 Q_CHECK_PTR( submenu );
570 submenu->addAction( actionSetListInstall );
571 submenu->addAction( actionSetListDontInstall );
572 submenu->addAction( actionSetListKeepInstalled );
573 submenu->addAction( actionSetListDelete );
574 submenu->addAction( actionSetListUpdate );
575 submenu->addAction( actionSetListUpdateForce );
576 submenu->addAction( actionSetListTaboo );
578 QAction *action = menu->addMenu( submenu );
579 action->setText( _(
"&All in This List" ) );
588 if ( ! _notInstalledContextMenu )
591 return _notInstalledContextMenu;
598 if ( ! _installedContextMenu )
601 return _installedContextMenu;
615 if ( selectable->hasInstalledObj() )
617 actionSetCurrentInstall->setEnabled(
false );
618 actionSetCurrentDontInstall->setEnabled(
false );
619 actionSetCurrentTaboo->setEnabled(
false );
620 actionSetCurrentProtected->setEnabled(
true );
622 actionSetCurrentKeepInstalled->setEnabled(
true );
623 actionSetCurrentDelete->setEnabled(
true );
624 actionSetCurrentUpdate->setEnabled( selectable->hasCandidateObj() );
625 actionSetCurrentUpdateForce->setEnabled( selectable->hasCandidateObj() );
629 actionSetCurrentInstall->setEnabled( selectable->hasCandidateObj() );
630 actionSetCurrentDontInstall->setEnabled(
true );
631 actionSetCurrentTaboo->setEnabled(
true );
632 actionSetCurrentProtected->setEnabled(
false );
634 actionSetCurrentKeepInstalled->setEnabled(
false );
635 actionSetCurrentDelete->setEnabled(
false );
636 actionSetCurrentUpdate->setEnabled(
false );
637 actionSetCurrentUpdateForce->setEnabled(
false );
639 actionShowCurrentSolverInfo->setEnabled(
true );
643 actionSetCurrentInstall->setEnabled(
false );
644 actionSetCurrentDontInstall->setEnabled(
false );
645 actionSetCurrentTaboo->setEnabled(
false );
647 actionSetCurrentKeepInstalled->setEnabled(
false );
648 actionSetCurrentDelete->setEnabled(
false );
649 actionSetCurrentUpdate->setEnabled(
false );
650 actionSetCurrentUpdateForce->setEnabled(
false );
651 actionSetCurrentProtected->setEnabled(
false );
653 actionShowCurrentSolverInfo->setEnabled(
false );
664 int special_combo = ( Qt::ControlModifier | Qt::ShiftModifier | Qt::AltModifier );
666 if ( ( event->modifiers() & special_combo ) == special_combo )
668 if ( event->key() == Qt::Key_Q )
671 yuiMilestone() <<
"Debug mode: " << _debug << endl;
675 QTreeWidgetItem * selectedListViewItem = currentItem();
677 if ( selectedListViewItem )
686 installed = item->
selectable()->hasInstalledObj();
690 ZyppStatus status = item->
status();
692 switch( event->key() )
703 ZyppStatus newStatus = S_KeepInstalled;
706 newStatus = S_Update;
727 case Qt::Key_Asterisk:
734 case Qt::Key_Greater:
743 if ( status == S_Update ||
744 status == S_AutoUpdate )
755 item->toggleDebugIsBroken();
765 item->toggleDebugIsSatisfied();
774 QY2ListView::keyPressEvent( event );
781 QY2ListViewItem * item =
new QY2ListViewItem(
this );
784 item->setText( nameCol() >= 0 ? nameCol() : 0, text );
785 item->setBackgroundColor( 0, QColor( 0xE0, 0xE0, 0xF8 ) );
792 _excludeRules.push_back( rule );
800 QTreeWidgetItemIterator listView_it(
this );
802 while ( *listView_it )
804 QTreeWidgetItem * current_item = *listView_it;
814 ExcludedItems::iterator excluded_it = _excludedItems->
begin();
816 while ( excluded_it != _excludedItems->
end() )
818 QTreeWidgetItem * current_item = (*excluded_it).first;
835 if ( _excludedItems->
size() > 0 )
837 yuiMilestone() << _excludedItems->
size() <<
" packages excluded" << endl;
839 for ( ExcludeRuleList::iterator rule_it = _excludeRules.begin();
840 rule_it != _excludeRules.end();
847 yuiMilestone() <<
"Active exclude rule: \""
848 << rule->
regexp().pattern() <<
"\""
863 #if VERBOSE_EXCLUDE_RULES
867 for ( ExcludeRuleList::iterator rule_it = _excludeRules.begin();
868 rule_it != _excludeRules.end() && !
exclude;
873 if ( rule->
match( item ) )
876 #if VERBOSE_EXCLUDE_RULES
884 this->
exclude( item, exclude );
886 #if VERBOSE_EXCLUDE_RULES
889 yuiDebug() <<
"Rule \"" << matchingRule->
regexp().pattern()
890 <<
"\" matches: Excluding " << item->
zyppObj()->name()
895 yuiDebug() <<
"Un-excluding " << item->
zyppObj()->name() << endl;
911 QTreeWidgetItem * parentItem = item->parent();
914 parentItem->setHidden(exclude);
916 item->setHidden(exclude);
918 _excludedItems->
add( item, parentItem );
927 : QY2ListViewItem( pkgObjList )
928 , _pkgObjList( pkgObjList )
929 , _selectable( selectable )
930 , _zyppObj( zyppObj )
939 QY2ListViewItem * parent,
942 : QY2ListViewItem( parent )
943 , _pkgObjList( pkgObjList )
944 , _selectable( selectable )
945 , _zyppObj( zyppObj )
954 : QY2ListViewItem( pkgObjList )
955 , _pkgObjList( pkgObjList )
973 if ( _zyppObj == 0 && _selectable )
974 _zyppObj = _selectable->theObj();
976 _debugIsBroken =
false;
977 _debugIsSatisfied =
false;
978 _candidateIsNewer =
false;
979 _installedIsNewer =
false;
981 const ZyppObj candidate =
selectable()->candidateObj();
982 const ZyppObj installed =
selectable()->installedObj();
984 if ( candidate && installed )
986 if ( candidate->edition() < installed->edition() )
987 _installedIsNewer =
true;
988 else if ( installed->edition() < candidate->edition() )
989 _candidateIsNewer =
true;
992 if ( installed && ! candidate )
993 _installedIsNewer =
true;
996 if ( summaryCol() >= 0 )
setText( summaryCol(),
zyppObj()->summary() );
998 if ( sizeCol() >= 0 )
1000 zypp::ByteCount size =
zyppObj()->installSize();
1003 setText( sizeCol(), size.asString() );
1006 if ( versionCol() == instVersionCol() )
1008 if ( versionCol() >= 0 )
1010 setBackgroundColor( versionCol(), _pkgObjList->palette().color( QPalette::AlternateBase ) );
1014 if (
zyppObj() != installed &&
1017 setText( versionCol(), QString().sprintf(
"%s",
zyppObj()->edition().c_str() ) );
1021 if ( candidate && installed->edition() != candidate->edition() )
1024 QString().sprintf(
"%s (%s)",
1025 installed->edition().c_str(),
1026 candidate->edition().c_str() ) );
1031 QString().sprintf(
"%s", installed->edition().c_str() ) );
1038 setText( versionCol(), QString().sprintf(
"(%s)", candidate->edition().c_str() ) );
1043 if ( _installedIsNewer )
1044 setTextColor( versionCol(), Qt::red);
1045 else if ( _candidateIsNewer )
1046 setTextColor( versionCol(), Qt::blue);
1051 if ( instVersionCol() >= 0 )
1055 setText( instVersionCol(), installed->edition() );
1057 if ( _installedIsNewer )
1058 setTextColor( instVersionCol(), Qt::red);
1059 else if ( _candidateIsNewer )
1060 setTextColor( instVersionCol(), Qt::blue);
1064 if ( versionCol() >= 0 )
1066 if (
zyppObj() != installed &&
1071 else if ( candidate )
1073 setText( versionCol(), candidate->edition() );
1075 if ( _installedIsNewer )
1076 setTextColor( versionCol(), Qt::red);
1077 else if ( _candidateIsNewer )
1078 setTextColor( versionCol(), Qt::blue);
1097 QTreeWidgetItem::setText( column, fromUTF8( text.c_str() ) );
1104 setText( column, edition.asString() );
1113 yuiError() <<
"No selectable" << endl;
1124 zypp::ResStatus::TransactByValue modifiedBy =
selectable()->modifiedBy();
1126 return ( modifiedBy == zypp::ResStatus::APPL_LOW ||
1127 modifiedBy == zypp::ResStatus::APPL_HIGH );
1135 ZyppStatus oldStatus =
selectable()->status();
1144 _pkgObjList->updateItemStates();
1156 zypp::getZYpp()->resolver()->resolvePool();
1171 if ( statusCol() >= 0 )
1178 if ( brokenIconCol() >= 0 )
1181 setIcon( brokenIconCol(), QPixmap() );
1184 if ( satisfiedIconCol() >= 0 )
1190 setIcon( satisfiedIconCol(),
isSatisfied() ? YQIconPool::pkgSatisfied() : QPixmap() );
1193 if ( brokenIconCol() >= 0 )
1200 setIcon( brokenIconCol(), YQIconPool::warningSign() );
1202 yuiWarning() <<
"Broken object: " << _selectable->theObj()->name()
1203 <<
" - " << _selectable->theObj()->summary()
1213 if ( _debugIsSatisfied )
1216 if ( _selectable->hasInstalledObj() )
1219 return _selectable->candidateObj().isSatisfied();
1225 if ( _debugIsBroken )
1228 if ( ! _selectable->hasInstalledObj() )
1233 case S_KeepInstalled:
1236 return _selectable->installedObj().isBroken();
1250 yuiError() <<
"Expected uninstalled zyppObj" << endl;
1254 yuiError() <<
"Should never get here" << endl;
1262 if ( ! _editable || ! _pkgObjList->
editable() )
1265 ZyppStatus oldStatus =
status();
1266 ZyppStatus newStatus = oldStatus;
1268 switch ( oldStatus )
1271 newStatus = S_NoInst;
1275 newStatus =
selectable()->hasCandidateObj() ?
1276 S_KeepInstalled: S_NoInst;
1280 newStatus =
selectable()->hasInstalledObj() ?
1281 S_KeepInstalled : S_NoInst;
1284 case S_KeepInstalled:
1285 newStatus =
selectable()->hasCandidateObj() ?
1294 newStatus = S_KeepInstalled;
1299 newStatus = S_KeepInstalled;
1305 newStatus = S_Install;
1309 yuiWarning() <<
"No candidate for " <<
selectable()->theObj()->name() << endl;
1310 newStatus = S_NoInst;
1317 newStatus = S_NoInst;
1321 if ( oldStatus != newStatus )
1353 text =
selectable()->candidateObj()->insnotify();
1360 text =
selectable()->candidateObj()->delnotify();
1366 if ( ! text.empty() )
1368 yuiDebug() <<
"Showing notify text" << endl;
1392 switch ( sel->status() )
1399 if ( sel->hasLicenceConfirmed() )
1402 if ( sel->candidateObj() )
1403 licenseText = sel->candidateObj()->licenseToConfirm();
1406 default:
return true;
1409 if ( licenseText.empty() )
1412 yuiDebug() <<
"Showing license agreement for " << sel->name() << endl;
1419 yuiMilestone() <<
"User confirmed license agreement for " << sel->name() << endl;
1420 sel->setLicenceConfirmed(
true );
1427 switch ( sel->status() )
1432 yuiWarning() <<
"User rejected license agreement for " << sel->name()
1433 <<
" - setting to TABOO"
1436 sel->setStatus( S_Taboo );
1443 yuiWarning() <<
"User rejected license agreement for " << sel->name()
1444 <<
" - setting to PROTECTED"
1447 sel->setStatus( S_Protected );
1463 if ( col == statusCol() )
1475 tip +=
"\n" + _(
"(by a software selection)" );
1477 tip +=
"\n" + _(
"(by dependencies)" );
1488 if ( col == brokenIconCol() )
1493 return _(
"Dependencies broken" );
1498 if ( col == satisfiedIconCol() )
1503 return _(
"All dependencies satisfied" );
1506 return QString::null;
1514 int col = treeWidget()->sortColumn();
1518 if ( col == nameCol() )
1520 return ( strcmp( this->
zyppObj()->name().c_str(), other->
zyppObj()->name().c_str() ) < 0 );
1522 if ( col == summaryCol() )
1525 return ( strcoll( this->
zyppObj()->summary().c_str(), other->
zyppObj()->summary().c_str() ) < 0 );
1527 if ( col == sizeCol() )
1531 return ( this->
zyppObj()->installSize() < other->
zyppObj()->installSize() );
1533 else if ( col == statusCol() )
1546 else if ( col == instVersionCol() ||
1547 col == versionCol() )
1562 if (thisPoints == otherPoints )
1563 return ( QString (this->
zyppObj()->edition().c_str() ) <
1564 QString (other->
zyppObj()->edition().c_str() ) );
1566 return ( thisPoints < otherPoints );
1571 return QY2ListViewItem::operator<( otherListViewItem );
1582 if (
selectable()->hasInstalledObj() ) points += 10;
1583 if (
selectable()->hasCandidateObj() ) points += 1;
1596 const QRegExp & regexp,
1612 #if VERBOSE_EXCLUDE_RULES
1613 yuiDebug() << ( enable ?
"Enabling" :
"Disabling" )
1614 <<
" exclude rule " << _regexp.pattern()
1640 QString text = item->text( _column );
1642 if ( text.isEmpty() )
1645 return _regexp.exactMatch( text );
1654 : _pkgObjList( parent )
1667 _excludeMap.insert( ItemPair( item, oldParent ) );
1673 ItemMap::iterator it = _excludeMap.find( item );
1675 if ( it != _excludeMap.end() )
1677 _excludeMap.erase( it );
1684 for ( ItemMap::iterator it = _excludeMap.begin();
1685 it != _excludeMap.end();
1691 _excludeMap.clear();
1697 return ( _excludeMap.find( item ) != _excludeMap.end() );
1711 QMenu * contextMenu =
1716 contextMenu->popup( viewport()->mapToGlobal( pos ) );
1723 ItemMap::iterator it = _excludeMap.find( item );
1725 if ( it == _excludeMap.end() )
1733 #include "YQPkgObjList.moc"
ZyppSel selectable() const
Abstract base class to display a list of zypp::ResObjects. Handles most generic stuff like setting st...
void setText(int column, const string text)
void setExcluded(bool exclude=true)
virtual QPixmap statusIcon(ZyppStatus status, bool enabled=true, bool bySelection=false)
void addPkgObjItem(ZyppSel selectable, ZyppObj zyppObj=0)
YQPkgObjListItem(YQPkgObjList *pkgObjList, ZyppSel selectable, ZyppObj zyppObj=0)
void addExcludeRule(YQPkgObjList::ExcludeRule *rule)
virtual void createInstalledContextMenu()
void setAllItemStatus(ZyppStatus newStatus, bool force=false)
bool candidateIsNewer() const
virtual QMenu * notInstalledContextMenu()
bool showLicenseAgreement()
virtual void updateData()
void setColumn(int column=0)
virtual void message(const QString &text)
static bool confirmText(QWidget *parent, const QString &text, const QString &acceptButtonLabel, const QString &rejectButtonLabel)
virtual void updateStatus()
void addPassiveItem(const QString &name, const QString &summary=QString::null, FSize size=-1)
ExcludeRule(YQPkgObjList *parent, const QRegExp ®exp, int column=0)
virtual void setStatus(ZyppStatus newStatus, bool sendSignals=true)
QAction * createAction(ZyppStatus status, const QString &key=QString::null, bool enabled=false)
virtual void pkgObjClicked(int button, QTreeWidgetItem *item, int col, const QPoint &pos)
void enable(bool enable=true)
void logExcludeStatistics()
virtual void currentItemChangedInternal(QTreeWidgetItem *item)
virtual void updateActions(YQPkgObjListItem *item=0)
void exclude(YQPkgObjListItem *item, bool exclude)
int versionPoints() const
virtual bool createZyppSolverDialog(const zypp::PoolItem item)
virtual bool operator<(const QTreeWidgetItem &other) const
bool match(QTreeWidgetItem *item)
static void showText(QWidget *parent, const QString &text)
ExcludedItems(YQPkgObjList *parent)
virtual bool bySelection() const
virtual void applyChanges()
bool contains(QTreeWidgetItem *item)
void setRegexp(const QRegExp ®exp)
QTreeWidgetItem * oldParentItem(QTreeWidgetItem *item)
virtual QMenu * addAllInListSubMenu(QMenu *menu)
virtual QString statusText(ZyppStatus status) const
void currentItemChanged(ZyppSel selectable)
void slotCustomContextMenu(const QPoint &pos)
void setCurrentStatus(ZyppStatus newStatus, bool selectNextItem=false, bool ifNewerOnly=false)
void sendUpdatePackages()
virtual void createNotInstalledContextMenu()
virtual QMenu * installedContextMenu()
bool installedIsNewer() const
virtual QString toolTip(int column)
void solveResolvableCollections()
void showNotifyTexts(ZyppStatus status)
virtual void keyPressEvent(QKeyEvent *ev)
YQPkgObjList(QWidget *parent)
virtual ZyppStatus status() const
static bool showLicenseAgreement(ZyppSel sel)
void add(QTreeWidgetItem *item, QTreeWidgetItem *oldParent)
virtual ~YQPkgObjListItem()
virtual void setStatusIcon()
virtual void cycleStatus()
void remove(QTreeWidgetItem *item)