libyui-qt-pkg  2.45.6
YQPkgPatchCategoryItem Class Reference
Inheritance diagram for YQPkgPatchCategoryItem:
Collaboration diagram for YQPkgPatchCategoryItem:

Public Member Functions

 YQPkgPatchCategoryItem (YQPkgPatchCategory category, YQPkgPatchList *patternList)
 Constructor.
 
virtual ~YQPkgPatchCategoryItem ()
 Destructor.
 
ZyppPatch firstPatch () const
 Returns the first pattern. More...
 
void addPatch (ZyppPatch patch)
 Add a pattern to this category. More...
 
virtual bool operator< (const QTreeWidgetItem &other) const
 sorting function
 
virtual void setExpanded (bool open)
 
YQPkgPatchCategory category () const
 Category (and order ) for this item.
 

Static Public Member Functions

static YQPkgPatchCategory patchCategory (QString category)
 Maps a string patch category to the corresponding enum.
 
static YQPkgPatchCategory patchCategory (const string &category)
 
static QString asString (YQPkgPatchCategory category)
 Converts a patch category to a user-readable (translated) string.
 

Protected Member Functions

void setTreeIcon (void)
 Set a suitable tree open/close icon depending on this category's open/close status. More...
 

Protected Attributes

YQPkgPatchCategory _category
 
YQPkgPatchList_patchList
 
ZyppPatch _firstPatch
 

Detailed Description

Definition at line 320 of file YQPkgPatchList.h.

Member Function Documentation

void YQPkgPatchCategoryItem::addPatch ( ZyppPatch  patch)

Add a pattern to this category.

This method sets firstPatch() if necessary.

Definition at line 632 of file YQPkgPatchList.cc.

Here is the call graph for this function:

ZyppPatch YQPkgPatchCategoryItem::firstPatch ( ) const
inline

Returns the first pattern.

This should be the first in sort order.

Definition at line 337 of file YQPkgPatchList.h.

void YQPkgPatchCategoryItem::setTreeIcon ( void  )
protected

Set a suitable tree open/close icon depending on this category's open/close status.

The default QListView plus/minus icons would require treeStepSize() to be set >0 and rootItemDecorated( true ), but that would look very ugly in this context, so the pattern categories paint their own tree open / close icons.

Definition at line 655 of file YQPkgPatchList.cc.


The documentation for this class was generated from the following files: