#include <YQPkgObjList.h>
Inheritance diagram for YQPkgObjList:
Public Slots | |
void | addPkgObjItem (PMObjectPtr pmObj) |
void | addPassiveItem (const QString &name, const QString &summary=QString::null, FSize size=-1) |
virtual void | pkgObjClicked (int button, QListViewItem *item, int col, const QPoint &pos) |
virtual void | clear () |
virtual void | updateActions (YQPkgObjListItem *item) |
virtual void | updateActions () |
void | selectNextItem () |
void | sendStatusChanged () |
virtual void | message (const QString &text) |
void | setCurrentInstall () |
void | setCurrentDontInstall () |
void | setCurrentKeepInstalled () |
void | setCurrentDelete () |
void | setCurrentUpdate () |
void | setCurrentTaboo () |
void | setCurrentProtected () |
void | setListInstall () |
void | setListDontInstall () |
void | setListKeepInstalled () |
void | setListDelete () |
void | setListUpdate () |
void | setListUpdateForce () |
void | setListTaboo () |
void | setListProtected () |
Signals | |
void | selectionChanged (PMObjectPtr pmObj) |
void | statusChanged () |
Public Member Functions | |
int | statusCol () const |
int | nameCol () const |
int | summaryCol () const |
int | sizeCol () const |
int | versionCol () const |
int | instVersionCol () const |
bool | editable () const |
void | setEditable (bool editable=true) |
void | setCurrentStatus (PMSelectable::UI_Status newStatus, bool selectNextItem=false) |
void | setAllItemStatus (PMSelectable::UI_Status newStatus, bool force=false) |
virtual QPopupMenu * | addAllInListSubMenu (QPopupMenu *menu) |
virtual QPixmap | statusIcon (PMSelectable::UI_Status status, bool enabled=true, bool bySelection=false) |
virtual QString | statusText (PMSelectable::UI_Status status) const |
Public Attributes | |
QAction * | actionSetCurrentInstall |
QAction * | actionSetCurrentDontInstall |
QAction * | actionSetCurrentKeepInstalled |
QAction * | actionSetCurrentDelete |
QAction * | actionSetCurrentUpdate |
QAction * | actionSetCurrentTaboo |
QAction * | actionSetCurrentProtected |
QAction * | actionSetListInstall |
QAction * | actionSetListDontInstall |
QAction * | actionSetListKeepInstalled |
QAction * | actionSetListDelete |
QAction * | actionSetListUpdate |
QAction * | actionSetListUpdateForce |
QAction * | actionSetListTaboo |
QAction * | actionSetListProtected |
Protected Slots | |
virtual void | selectionChangedInternal (QListViewItem *item) |
Protected Member Functions | |
YQPkgObjList (QWidget *parent) | |
virtual | ~YQPkgObjList () |
virtual void | keyPressEvent (QKeyEvent *ev) |
virtual QPopupMenu * | installedContextMenu () |
virtual QPopupMenu * | notInstalledContextMenu () |
virtual void | createNotInstalledContextMenu () |
virtual void | createInstalledContextMenu () |
void | createActions () |
QAction * | createAction (PMSelectable::UI_Status status, const QString &key=QString::null, bool enabled=false) |
QAction * | createAction (const QString &text, const QPixmap &icon=QPixmap(), const QPixmap &insensitiveIcon=QPixmap(), const QString &key=QString::null, bool enabled=false) |
Protected Attributes | |
int | _statusCol |
int | _nameCol |
int | _summaryCol |
int | _sizeCol |
int | _versionCol |
int | _instVersionCol |
bool | _editable |
QPopupMenu * | _installedContextMenu |
QPopupMenu * | _notInstalledContextMenu |
|
Constructor. Does not add any QListView columns! |
|
Destructor |
|
Add a submenu "All in this list..." to 'menu'. Returns the newly created submenu. Reimplemented in YQPkgList, and YQPkgYouPatchList. |
|
Add a purely passive list item that has a name and optional summary and size. |
|
Add a PMObject to the list. Connect a filter's filterMatch() signal to this slot. Remember to connect filterStart() to clear() (inherited from QListView). 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! |
|
Reimplemented from QY2ListView: Emit selectionChanged() signal after clearing the list. Reimplemented from QY2ListView. |
|
Low-level: Create an action. 'key' is only a descriptive text, no true accelerator. |
|
Create an action based on a PMObject status - automatically retrieve the corresponding status icons ( both sensitive and insensitive ) and text. 'key' is only a descriptive text, no true accelerator. |
|
Create the actions for the context menus. Note: This is intentionally not virtual! Reimplemented in YQPkgList. |
|
Create the context menu for installed items. Reimplemented in YQPkgList, and YQPkgYouPatchList. |
|
Create the context menu for items that are not installed. Reimplemented in YQPkgList, and YQPkgYouPatchList. |
|
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. |
|
Returns the context menu for items that are not installed. Creates the menu upon the first call. |
|
|
|
Event handler for keyboard input. Only very special keys are processed here. Reimplemented from QListView / QWidget. Reimplemented in YQPkgYouPatchList. |
|
Display a one-line message in the list. Reimplemented in YQPkgYouPatchList. |
|
|
|
Returns the context menu for items that are installed. Creates the menu upon the first call. |
|
Dispatcher slot for mouse click: cycle status depending on column. Reimplemented in YQPkgList. |
|
Emitted when a PMObject is selected. May be called with a null poiner if no PMObject is selected. |
|
Dispatcher slot for selection change - internal only. |
|
Select the next item, i.e. move the selection one item further down the list. |
|
Emit a statusChanged() signal for the specified PMObject. |
|
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 PMObjects to 'update' that really come with a newer version. |
|
|
|
|
|
|
|
|
|
|
|
Sets the currently selected item's status. Automatically selects the next item if 'selectNextItem' is 'true'. |
|
|
|
|
|
Set the list's editable status. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Emitted when the status of a PMObject is changed. |
|
|
|
Returns the suitable icon for a PMObject 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. |
|
Returns a short ( one line ) descriptive text for a PMObject status. |
|
|
|
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. |
|
Update the internal actions: What actions are available for 'item'? Reimplemented in YQPkgList. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|