Abstract base class to display a list of zypp::ResObjects. Handles most generic stuff like setting status etc.
More...
#include <YQPkgObjList.h>
|
void | addPkgObjItem (ZyppSel selectable, ZyppObj zyppObj=0) |
|
void | addPassiveItem (const QString &name, const QString &summary=QString(), FSize size=-1) |
|
virtual void | pkgObjClicked (int button, QTreeWidgetItem *item, int col, const QPoint &pos) |
|
virtual void | clear () |
|
virtual void | updateActions (YQPkgObjListItem *item=0) |
|
void | sendUpdatePackages () |
|
void | selectNextItem () |
|
void | sendStatusChanged () |
|
virtual void | message (const QString &text) |
|
void | logExcludeStatistics () |
|
void | maybeSetFocus () |
|
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 () |
|
|
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 |
|
|
int | _iconCol |
|
int | _statusCol |
|
int | _nameCol |
|
int | _summaryCol |
|
int | _sizeCol |
|
int | _versionCol |
|
int | _instVersionCol |
|
int | _brokenIconCol |
|
int | _satisfiedIconCol |
|
bool | _editable |
|
bool | _debug |
|
int | _excludedItemsCount |
|
ExcludeRuleList | _excludeRules |
|
QMenu * | _installedContextMenu |
|
QMenu * | _notInstalledContextMenu |
|
Abstract base class to display a list of zypp::ResObjects. Handles most generic stuff like setting status etc.
◆ YQPkgObjList()
YQPkgObjList::YQPkgObjList |
( |
QWidget * | parent | ) |
|
|
protected |
Constructor. Does not add any QListView columns!
◆ ~YQPkgObjList()
YQPkgObjList::~YQPkgObjList |
( |
| ) |
|
|
protectedvirtual |
◆ addAllInListSubMenu()
QMenu * YQPkgObjList::addAllInListSubMenu |
( |
QMenu * | menu | ) |
|
|
virtual |
Add a submenu "All in this list..." to 'menu'. Returns the newly created submenu.
Reimplemented in YQPkgList, and YQPkgPatchList.
◆ addExcludeRule()
Add an exclude rule to this list.
◆ addPassiveItem
void YQPkgObjList::addPassiveItem |
( |
const QString & | name, |
|
|
const QString & | summary = QString(), |
|
|
FSize | size = -1 ) |
|
slot |
Add a purely passive list item that has a name and optional summary and size.
◆ addPkgObjItem
void YQPkgObjList::addPkgObjItem |
( |
ZyppSel | selectable, |
|
|
ZyppObj | zyppObj = 0 ) |
|
slot |
Add a zypp::ResObject to the list. Connect a filter's filterMatch() signal to this slot. Remember to connect filterStart() to clear() (inherited from QListView).
'zyppObj' has to be one of the objects of 'selectable'. If it is 0, selectable->theObject() will be used.
Intentionally NOT named addItem() so the calling class cannot confuse this method with overlaid methods of the same name that were simply forgotten to implement!
◆ applyExcludeRules() [1/2]
void YQPkgObjList::applyExcludeRules |
( |
| ) |
|
Apply all exclude rules of this list to all items, including those that are currently excluded.
◆ applyExcludeRules() [2/2]
void YQPkgObjList::applyExcludeRules |
( |
QTreeWidgetItem * | listViewItem | ) |
|
Apply all exclude rules of this list to one item.
◆ clear
void YQPkgObjList::clear |
( |
| ) |
|
|
virtualslot |
◆ createAction() [1/2]
QAction * YQPkgObjList::createAction |
( |
const QString & | text, |
|
|
const QPixmap & | icon = QPixmap(), |
|
|
const QPixmap & | insensitiveIcon = QPixmap(), |
|
|
const QString & | key = QString(), |
|
|
bool | enabled = false ) |
|
protected |
Low-level: Create an action. 'key' is only a descriptive text, no true accelerator.
◆ createAction() [2/2]
QAction * YQPkgObjList::createAction |
( |
ZyppStatus | status, |
|
|
const QString & | key = QString(), |
|
|
bool | enabled = false ) |
|
protected |
Create an action based on a zypp::ResObject status - automatically retrieve the corresponding status icons (both sensitive and insensitive) and text. 'key' is only a descriptive text, no true accelerator.
◆ createActions()
void YQPkgObjList::createActions |
( |
| ) |
|
|
protected |
Create the actions for the context menus. Note: This is intentionally not virtual!
◆ createInstalledContextMenu()
void YQPkgObjList::createInstalledContextMenu |
( |
| ) |
|
|
protectedvirtual |
◆ createNotInstalledContextMenu()
void YQPkgObjList::createNotInstalledContextMenu |
( |
| ) |
|
|
protectedvirtual |
◆ currentItemChanged
void YQPkgObjList::currentItemChanged |
( |
ZyppSel | selectable | ) |
|
|
signal |
Emitted when a zypp::ui::Selectable is selected. May be called with a null poiner if no zypp::ResObject is selected.
◆ currentItemChangedInternal
void YQPkgObjList::currentItemChangedInternal |
( |
QTreeWidgetItem * | item | ) |
|
|
protectedvirtualslot |
Dispatcher slot for selection change - internal only.
◆ editable()
bool YQPkgObjList::editable |
( |
| ) |
const |
|
inline |
Return whether or not items in this list are generally editable, i.e. the user can change their status. Note that individual items can be set to non-editable even if the list is generally editable. Lists are editable by default.
◆ exclude()
Exclude or include an item, i.e. remove it from the visible items and add it to the internal exclude list or vice versa.
◆ installedContextMenu()
QMenu * YQPkgObjList::installedContextMenu |
( |
| ) |
|
|
protectedvirtual |
Returns the context menu for items that are not installed. Creates the menu upon the first call.
◆ keyPressEvent()
void YQPkgObjList::keyPressEvent |
( |
QKeyEvent * | ev | ) |
|
|
protectedvirtual |
Event handler for keyboard input. Only very special keys are processed here.
Reimplemented from QListView / QWidget.
Reimplemented in YQPkgPatchList.
◆ logExcludeStatistics
void YQPkgObjList::logExcludeStatistics |
( |
| ) |
|
|
slot |
Write statistics about excluded items to the log, if there are any.
◆ maybeSetFocus
void YQPkgObjList::maybeSetFocus |
( |
| ) |
|
|
slot |
Set the keyboard focus to this list unless the focus is currently on a similar widget that relies on heavy keyboard interaction, like another list.
◆ message
void YQPkgObjList::message |
( |
const QString & | text | ) |
|
|
virtualslot |
Display a one-line message in the list.
◆ notInstalledContextMenu()
QMenu * YQPkgObjList::notInstalledContextMenu |
( |
| ) |
|
|
protectedvirtual |
Returns the context menu for items that are installed. Creates the menu upon the first call.
◆ pkgObjClicked
void YQPkgObjList::pkgObjClicked |
( |
int | button, |
|
|
QTreeWidgetItem * | item, |
|
|
int | col, |
|
|
const QPoint & | pos ) |
|
virtualslot |
Dispatcher slot for mouse click: cycle status depending on column.
◆ selectNextItem
void YQPkgObjList::selectNextItem |
( |
| ) |
|
|
slot |
Select the next item, i.e. move the selection one item further down the list.
◆ sendStatusChanged
void YQPkgObjList::sendStatusChanged |
( |
| ) |
|
|
inlineslot |
◆ sendUpdatePackages
void YQPkgObjList::sendUpdatePackages |
( |
| ) |
|
|
inlineslot |
◆ setAllItemStatus()
void YQPkgObjList::setAllItemStatus |
( |
ZyppStatus | newStatus, |
|
|
bool | force = false ) |
Sets the status of all (toplevel) list items to 'newStatus', if possible. Only one single statusChanged() signal is emitted.
'force' overrides sensible defaults like setting only zypp::ResObjects to 'update' that really come with a newer version.
◆ setCurrentStatus()
void YQPkgObjList::setCurrentStatus |
( |
ZyppStatus | newStatus, |
|
|
bool | selectNextItem = false, |
|
|
bool | ifNewerOnly = false ) |
Sets the currently selected item's status. Automatically selects the next item if 'selectNextItem' is 'true'.
◆ setEditable()
void YQPkgObjList::setEditable |
( |
bool | editable = true | ) |
|
|
inline |
Set the list's editable status.
◆ shouldKeepFocus()
bool YQPkgObjList::shouldKeepFocus |
( |
QWidget * | widget | ) |
const |
|
protected |
Return 'true' if 'widget' should keep the keyboard focus, i.e. it's also some kind of list widget that has internal navigation with the cursor keys; like another list or tree widget.
◆ slotCustomContextMenu
void YQPkgObjList::slotCustomContextMenu |
( |
const QPoint & | pos | ) |
|
|
protectedslot |
slot that shows context menu when requested
◆ statusChanged
void YQPkgObjList::statusChanged |
( |
| ) |
|
|
signal |
Emitted when the status of a zypp::ResObject is changed.
◆ statusIcon()
QPixmap YQPkgObjList::statusIcon |
( |
ZyppStatus | status, |
|
|
bool | enabled = true, |
|
|
bool | bySelection = false ) |
|
virtual |
Returns the suitable icon for a zypp::ResObject status - the regular icon if 'enabled' is 'true' or the insensitive icon if 'enabled' is 'false. 'bySelection' is relevant only for auto-states: This uses the icon for 'auto-by-selection" rather than the default auto-icon.
◆ statusText()
QString YQPkgObjList::statusText |
( |
ZyppStatus | status | ) |
const |
|
virtual |
Returns a short (one line) descriptive text for a zypp::ResObject status.
◆ updateActions
Update the internal actions for the currently selected item ( if any ). This only calls updateActions( YQPkgObjListItem * ) with the currently selected item as argument, so there is normally no need to reimplement this method, too, if the other one is reimplemented.
◆ updatePackages
void YQPkgObjList::updatePackages |
( |
| ) |
|
|
signal |
Emitted when it's time to update displayed package information, e.g., package states.
The documentation for this class was generated from the following files:
- /builddir/build/BUILD/libyui-4.6.0/libyui-qt-pkg/src/YQPkgObjList.h
- /builddir/build/BUILD/libyui-4.6.0/libyui-qt-pkg/src/YQPkgObjList.cc