41 #ifndef YQPkgObjList_h
42 #define YQPkgObjList_h
50 #include <QY2ListView.h>
52 #include <zypp/Edition.h>
55 #include "YQZyppSolverDialogPluginStub.h"
84 using QTreeWidget::currentItemChanged;
89 QTreeWidgetItem * itemFromIndex (
const QModelIndex & index )
const
90 {
return QY2ListView::itemFromIndex(index); }
94 int iconCol()
const {
return _iconCol; }
95 int statusCol()
const {
return _statusCol; }
96 int nameCol()
const {
return _nameCol; }
97 int summaryCol()
const {
return _summaryCol; }
98 int sizeCol()
const {
return _sizeCol; }
99 int versionCol()
const {
return _versionCol; }
100 int instVersionCol()
const {
return _instVersionCol; }
101 int brokenIconCol()
const {
return _brokenIconCol; }
102 int satisfiedIconCol()
const {
return _satisfiedIconCol; }
123 bool ifNewerOnly =
false );
152 virtual QPixmap
statusIcon( ZyppStatus status,
154 bool bySelection =
false );
159 virtual QString
statusText( ZyppStatus status )
const;
202 ZyppObj zyppObj = 0 );
209 const QString & summary = QString::null,
216 QTreeWidgetItem * item,
218 const QPoint & pos );
224 virtual void clear();
253 virtual void message(
const QString & text );
362 const QString & key = QString::null,
363 bool enabled =
false );
370 const QPixmap & icon = QPixmap(),
371 const QPixmap & insensitiveIcon = QPixmap(),
372 const QString & key = QString::null,
373 bool enabled =
false );
387 int _satisfiedIconCol;
391 typedef list<ExcludeRule *> ExcludeRuleList;
393 ExcludeRuleList _excludeRules;
394 ExcludedItems * _excludedItems;
396 QMenu * _installedContextMenu;
397 QMenu * _notInstalledContextMenu;
402 QAction * actionSetCurrentInstall;
403 QAction * actionSetCurrentDontInstall;
404 QAction * actionSetCurrentKeepInstalled;
405 QAction * actionSetCurrentDelete;
406 QAction * actionSetCurrentUpdate;
407 QAction * actionSetCurrentUpdateForce;
408 QAction * actionSetCurrentTaboo;
409 QAction * actionSetCurrentProtected;
410 QAction * actionShowCurrentSolverInfo;
412 QAction * actionSetListInstall;
413 QAction * actionSetListDontInstall;
414 QAction * actionSetListKeepInstalled;
415 QAction * actionSetListDelete;
416 QAction * actionSetListUpdate;
417 QAction * actionSetListUpdateForce;
418 QAction * actionSetListTaboo;
419 QAction * actionSetListProtected;
452 QY2ListViewItem * parent,
488 virtual ZyppStatus
status()
const;
503 virtual void setStatus( ZyppStatus newStatus,
bool sendSignals =
true );
574 virtual bool operator< (
const QTreeWidgetItem & other )
const;
601 virtual QString
toolTip(
int column );
618 bool debugIsBroken()
const {
return _debugIsBroken; }
619 bool debugIsSatisfied()
const {
return _debugIsSatisfied; }
620 void setDebugIsBroken (
bool val =
true ) { _debugIsBroken = val; }
621 void setDebugIsSatisfied(
bool val =
true ) { _debugIsSatisfied = val; }
622 void toggleDebugIsBroken() { _debugIsBroken = ! _debugIsBroken; }
623 void toggleDebugIsSatisfied() { _debugIsSatisfied = ! _debugIsSatisfied; }
628 int statusCol()
const {
return _pkgObjList->statusCol(); }
629 int nameCol()
const {
return _pkgObjList->nameCol(); }
630 int summaryCol()
const {
return _pkgObjList->summaryCol(); }
631 int sizeCol()
const {
return _pkgObjList->sizeCol(); }
632 int versionCol()
const {
return _pkgObjList->versionCol(); }
633 int instVersionCol()
const {
return _pkgObjList->instVersionCol(); }
634 int brokenIconCol()
const {
return _pkgObjList->brokenIconCol(); }
635 int satisfiedIconCol()
const {
return _pkgObjList->satisfiedIconCol(); }
667 void setText(
int column,
const string text );
674 void setText(
int column,
const QString & text )
675 { QTreeWidgetItem::setText( column, text ); }
680 void setText(
int column,
const zypp::Edition & edition );
691 bool _candidateIsNewer:1;
692 bool _installedIsNewer:1;
694 bool _debugIsBroken:1;
695 bool _debugIsSatisfied:1;
739 void setRegexp(
const QRegExp & regexp );
744 QRegExp
regexp()
const {
return _regexp; };
766 bool match( QTreeWidgetItem * item );
781 typedef std::map <QTreeWidgetItem *, QTreeWidgetItem *> ItemMap;
782 typedef std::pair<QTreeWidgetItem *, QTreeWidgetItem *> ItemPair;
783 typedef ItemMap::iterator iterator;
802 void add( QTreeWidgetItem * item, QTreeWidgetItem * oldParent );
808 void remove( QTreeWidgetItem * item );
818 bool contains( QTreeWidgetItem * item );
829 int size()
const {
return (
int) _excludeMap.size(); }
834 iterator
begin() {
return _excludeMap.begin(); }
839 iterator
end() {
return _excludeMap.end(); }
842 void updateActions();
849 #endif // ifndef YQPkgObjList_h