41 #ifndef YQPkgPatternList_h
42 #define YQPkgPatternList_h
44 #include "YQPkgObjList.h"
71 YQPkgPatternList( QWidget * parent,
bool autoFill =
true,
bool autoFilter =
true );
101 ZyppPattern pattern );
115 QTreeWidgetItem * item,
117 const QPoint & pos );
134 int howmanyCol()
const {
return _howmanyCol; }
168 QMap<QString, YQPkgPatternCategoryItem*> _categories;
201 ZyppPattern
zyppPattern()
const {
return _zyppPattern; }
212 virtual bool operator< (
const QTreeWidgetItem & other )
const;
216 int statusCol()
const {
return _patternList->statusCol(); }
217 int summaryCol()
const {
return _patternList->summaryCol(); }
219 int totalPackages()
const {
return _total; }
220 int installedPackages()
const {
return _installed; }
223 void setTotalPackages(
int v) { _total = v; }
224 void setInstalledPackages(
int v) { _installed = v; }
250 ZyppPattern _zyppPattern;
266 const QString & category );
276 ZyppPattern
firstPattern()
const {
return _firstPattern; }
286 virtual bool operator< (
const QTreeWidgetItem & other )
const;
293 virtual void setExpanded(
bool open );
313 ZyppPattern _firstPattern;
317 #endif // ifndef YQPkgPatternList_h
virtual bool operator<(const QTreeWidgetItem &other) const
sorting function
virtual ~YQPkgPatternListItem()
Destructor.
virtual ~YQPkgPatternList()
Destructor.
void setTreeIcon(void)
Set a suitable tree open/close icon depending on this category's open/close status.
virtual ~YQPkgPatternCategoryItem()
Destructor.
ZyppPattern firstPattern() const
Returns the first pattern.
YQPkgPatternListItem * selection() const
Returns the currently selected item or 0 if there is none.
void filterStart()
Emitted when the filtering starts.
virtual void pkgObjClicked(int button, QTreeWidgetItem *item, int col, const QPoint &pos)
Dispatcher slot for mouse click: cycle status depending on column.
void addPatternItem(ZyppSel selectable, ZyppPattern pattern)
Add a pattern to the list.
virtual bool operator<(const QTreeWidgetItem &other) const
sorting function
void init()
Initialize things common to all constructors.
ZyppSel selectable() const
Returns the original selectable within the package manager backend.
void filterFinished()
Emitted when filtering is finished.
Display a list of zypp::Pattern objects.
virtual void applyChanges()
Propagate status changes in this list to other lists: Have the solver transact all patterns.
void fillList()
Fill the pattern list.
virtual void selectSomething()
Select the first selectable list entry that is not a pattern category.
YQPkgPatternCategoryItem(YQPkgPatternList *patternList, const QString &category)
Constructor.
void filterMatch(ZyppSel selectable, ZyppPkg pkg)
Emitted during filtering for each pkg that matches the filter.
void addPattern(ZyppPattern pattern)
Add a pattern to this category.
virtual void cycleStatus()
Cycle the package status to the next valid value.
void resetToolTip()
resets the tooltip with the current available information
void filterIfVisible()
Same as filter(), but only if this widget is currently visible.
YQPkgPatternListItem(YQPkgPatternList *patternList, ZyppSel selectable, ZyppPattern zyppPattern)
Constructor for root items.
void filter()
Filter according to the view's rules and current selection.
YQPkgPatternCategoryItem * category(const QString &categoryName)
Returns the category item with the specified name.
YQPkgPatternList(QWidget *parent, bool autoFill=true, bool autoFilter=true)
Constructor.
Abstract base class to display a list of zypp::ResObjects.
ZyppPattern zyppPattern() const
Returns the original object within the package manager backend.