libyui-qt-pkg
2.45.28
|
Display a list of zypp::Patch objects. More...
#include <YQPkgPatchList.h>
Public Types | |
enum | FilterCriteria { RelevantPatches, RelevantAndInstalledPatches, AllPatches } |
Public Slots | |
void | filter () |
Filter according to the view's rules and current selection. More... | |
void | filterIfVisible () |
Same as filter(), but only if this widget is currently visible. | |
void | addPatchItem (ZyppSel selectable, ZyppPatch zyppPatch) |
Add a patch to the list. More... | |
void | fillList () |
Fill the patch list according to filterCriteria(). | |
virtual void | message (const QString &text) |
Display a one-line message in the list. More... | |
![]() | |
void | addPkgObjItem (ZyppSel selectable, ZyppObj zyppObj=0) |
Add a zypp::ResObject to the list. More... | |
void | addPassiveItem (const QString &name, const QString &summary=QString::null, FSize size=-1) |
Add a purely passive list item that has a name and optional summary and size. | |
virtual void | pkgObjClicked (int button, QTreeWidgetItem *item, int col, const QPoint &pos) |
Dispatcher slot for mouse click: cycle status depending on column. | |
virtual void | clear () |
Reimplemented from QY2ListView: Emit currentItemChanged() signal after clearing the list. | |
virtual void | updateActions (YQPkgObjListItem *item=0) |
Update the internal actions for the currently selected item ( if any ). More... | |
void | sendUpdatePackages () |
Emit an updatePackages() signal. | |
void | selectNextItem () |
Select the next item, i.e. More... | |
void | sendStatusChanged () |
Emit a statusChanged() signal for the specified zypp::ResObject. | |
virtual void | message (const QString &text) |
Display a one-line message in the list. | |
void | logExcludeStatistics () |
Write statistics about excluded items to the log, if there are any. | |
void | setCurrentInstall () |
void | setCurrentDontInstall () |
void | setCurrentKeepInstalled () |
void | setCurrentDelete () |
void | setCurrentUpdate () |
void | setCurrentUpdateForce () |
void | setCurrentTaboo () |
void | setCurrentProtected () |
void | setListInstall () |
void | setListDontInstall () |
void | setListKeepInstalled () |
void | setListDelete () |
void | setListUpdate () |
void | setListUpdateForce () |
void | setListTaboo () |
void | setListProtected () |
Signals | |
void | filterStart () |
Emitted when the filtering starts. More... | |
void | filterMatch (ZyppSel selectable, ZyppPkg pkg) |
Emitted during filtering for each pkg that matches the filter. | |
void | filterMatch (const QString &name, const QString &summary, FSize size) |
Emitted during filtering for non-pkg items: pre-script, post-script, files. | |
void | filterFinished () |
Emitted when filtering is finished. | |
![]() | |
void | currentItemChanged (ZyppSel selectable) |
Emitted when a zypp::ui::Selectable is selected. More... | |
void | statusChanged () |
Emitted when the status of a zypp::ResObject is changed. | |
void | updatePackages () |
Emitted when it's time to update displayed package information, e.g., package states. | |
Public Member Functions | |
YQPkgPatchList (QWidget *parent) | |
Constructor. | |
virtual | ~YQPkgPatchList () |
Destructor. | |
void | setFilterCriteria (FilterCriteria filterCriteria) |
Set the filter criteria for fillList(). | |
FilterCriteria | filterCriteria () const |
Returns the current filter criteria. | |
YQPkgPatchListItem * | selection () const |
Returns the currently selected item or 0 if there is none. | |
int | categoryCol () const |
Returns the column for the patch category. | |
virtual QMenu * | addAllInListSubMenu (QMenu *menu) |
Add a submenu "All in this list..." to 'menu'. More... | |
virtual void | polish () |
Delayed initialization after the dialog is fully created. More... | |
![]() | |
QTreeWidgetItem * | itemFromIndex (const QModelIndex &index) const |
int | iconCol () const |
int | statusCol () const |
int | nameCol () const |
int | summaryCol () const |
int | sizeCol () const |
int | versionCol () const |
int | instVersionCol () const |
int | brokenIconCol () const |
int | satisfiedIconCol () const |
bool | editable () const |
Return whether or not items in this list are generally editable, i.e. More... | |
void | setEditable (bool editable=true) |
Set the list's editable status. | |
void | setCurrentStatus (ZyppStatus newStatus, bool selectNextItem=false, bool ifNewerOnly=false) |
Sets the currently selected item's status. More... | |
void | setAllItemStatus (ZyppStatus newStatus, bool force=false) |
Sets the status of all (toplevel) list items to 'newStatus', if possible. More... | |
virtual QPixmap | statusIcon (ZyppStatus status, bool enabled=true, bool bySelection=false) |
Returns the suitable icon for a zypp::ResObject status - the regular icon if 'enabled' is 'true' or the insensitive icon if 'enabled' is 'false. More... | |
virtual QString | statusText (ZyppStatus status) const |
Returns a short (one line) descriptive text for a zypp::ResObject status. | |
void | addExcludeRule (YQPkgObjList::ExcludeRule *rule) |
Add an exclude rule to this list. | |
void | applyExcludeRules () |
Apply all exclude rules of this list to all items, including those that are currently excluded. | |
void | applyExcludeRules (QTreeWidgetItem *) |
Apply all exclude rules of this list to one item. | |
void | exclude (YQPkgObjListItem *item, bool exclude) |
Exclude or include an item, i.e. More... | |
Protected Member Functions | |
YQPkgPatchCategoryItem * | category (YQPkgPatchCategory category) |
returns or creates a category item for a defined category | |
virtual void | createNotInstalledContextMenu () |
Create the context menu for items that are not installed. More... | |
virtual void | createInstalledContextMenu () |
Create the context menu for installed items. More... | |
virtual void | keyPressEvent (QKeyEvent *ev) |
Event handler for keyboard input. More... | |
![]() | |
YQPkgObjList (QWidget *parent) | |
Constructor. More... | |
virtual | ~YQPkgObjList () |
Destructor. | |
virtual QMenu * | installedContextMenu () |
Returns the context menu for items that are not installed. More... | |
virtual QMenu * | notInstalledContextMenu () |
Returns the context menu for items that are installed. More... | |
void | createActions () |
Create the actions for the context menus. More... | |
QAction * | createAction (ZyppStatus status, const QString &key=QString::null, bool enabled=false) |
Create an action based on a zypp::ResObject status - automatically retrieve the corresponding status icons (both sensitive and insensitive) and text. More... | |
QAction * | createAction (const QString &text, const QPixmap &icon=QPixmap(), const QPixmap &insensitiveIcon=QPixmap(), const QString &key=QString::null, bool enabled=false) |
Low-level: Create an action. More... | |
Protected Attributes | |
int | _categoryCol |
YQPkgSelMapper | _selMapper |
FilterCriteria | _filterCriteria |
QMap< YQPkgPatchCategory, YQPkgPatchCategoryItem * > | _categories |
![]() | |
int | _iconCol |
int | _statusCol |
int | _nameCol |
int | _summaryCol |
int | _sizeCol |
int | _versionCol |
int | _instVersionCol |
int | _brokenIconCol |
int | _satisfiedIconCol |
bool | _editable |
bool | _debug |
ExcludeRuleList | _excludeRules |
ExcludedItems * | _excludedItems |
QMenu * | _installedContextMenu |
QMenu * | _notInstalledContextMenu |
Additional Inherited Members | |
![]() | |
QAction * | actionSetCurrentInstall |
QAction * | actionSetCurrentDontInstall |
QAction * | actionSetCurrentKeepInstalled |
QAction * | actionSetCurrentDelete |
QAction * | actionSetCurrentUpdate |
QAction * | actionSetCurrentUpdateForce |
QAction * | actionSetCurrentTaboo |
QAction * | actionSetCurrentProtected |
QAction * | actionSetListInstall |
QAction * | actionSetListDontInstall |
QAction * | actionSetListKeepInstalled |
QAction * | actionSetListDelete |
QAction * | actionSetListUpdate |
QAction * | actionSetListUpdateForce |
QAction * | actionSetListTaboo |
QAction * | actionSetListProtected |
![]() | |
typedef list< ExcludeRule * > | ExcludeRuleList |
![]() | |
virtual void | currentItemChangedInternal (QTreeWidgetItem *item) |
Dispatcher slot for selection change - internal only. | |
void | slotCustomContextMenu (const QPoint &pos) |
slot that shows context menu when requested | |
Display a list of zypp::Patch objects.
Definition at line 74 of file YQPkgPatchList.h.
|
virtual |
Add a submenu "All in this list..." to 'menu'.
Returns the newly created submenu.
Reimplemented from YQPkgObjList.
Reimplemented from YQPkgObjList.
Definition at line 417 of file YQPkgPatchList.cc.
|
slot |
Add a patch to the list.
Connect a filter's filterMatch() signal to this slot. Remember to connect filterStart() to clear() (inherited from QListView).
Definition at line 340 of file YQPkgPatchList.cc.
|
protectedvirtual |
Create the context menu for installed items.
Reimplemented from YQPkgObjList.
Reimplemented from YQPkgObjList.
Definition at line 397 of file YQPkgPatchList.cc.
|
protectedvirtual |
Create the context menu for items that are not installed.
Reimplemented from YQPkgObjList.
Reimplemented from YQPkgObjList.
Definition at line 383 of file YQPkgPatchList.cc.
|
slot |
Filter according to the view's rules and current selection.
Emits those signals: filterStart() filterMatch() for each pkg that matches the filter filterFinished()
Definition at line 302 of file YQPkgPatchList.cc.
|
signal |
Emitted when the filtering starts.
Use this to clear package lists etc. prior to adding new entries.
|
protectedvirtual |
Event handler for keyboard input.
Only very special keys are processed here.
Reimplemented from YQPkgObjList / QWidget.
Reimplemented from YQPkgObjList.
Definition at line 443 of file YQPkgPatchList.cc.
|
virtualslot |
Display a one-line message in the list.
Reimplemented from YQPkgObjList.
Definition at line 284 of file YQPkgPatchList.cc.
|
virtual |
Delayed initialization after the dialog is fully created.
Reimplemented from QWidget.
Definition at line 159 of file YQPkgPatchList.cc.