Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

YQPkgObjList Class Reference

Abstract base class to display a list of PMObjects. Handles most generic stuff like setting status etc. More...

#include <YQPkgObjList.h>

Inheritance diagram for YQPkgObjList:

QY2ListView YQPkgList YQPkgSelList YQPkgYouPatchList List of all members.

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

Detailed Description

Abstract base class to display a list of PMObjects. Handles most generic stuff like setting status etc.


Constructor & Destructor Documentation

YQPkgObjList::YQPkgObjList QWidget *  parent  )  [protected]
 

Constructor. Does not add any QListView columns!

YQPkgObjList::~YQPkgObjList  )  [protected, virtual]
 

Destructor


Member Function Documentation

QPopupMenu * YQPkgObjList::addAllInListSubMenu QPopupMenu *  menu  )  [virtual]
 

Add a submenu "All in this list..." to 'menu'. Returns the newly created submenu.

Reimplemented in YQPkgList, and YQPkgYouPatchList.

void YQPkgObjList::addPassiveItem const QString &  name,
const QString &  summary = QString::null,
FSize  size = -1
[slot]
 

Add a purely passive list item that has a name and optional summary and size.

void YQPkgObjList::addPkgObjItem PMObjectPtr  pmObj  )  [slot]
 

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!

void YQPkgObjList::clear  )  [virtual, slot]
 

Reimplemented from QY2ListView: Emit selectionChanged() signal after clearing the list.

Reimplemented from QY2ListView.

QAction * YQPkgObjList::createAction const QString &  text,
const QPixmap &  icon = QPixmap(),
const QPixmap &  insensitiveIcon = QPixmap(),
const QString &  key = QString::null,
bool  enabled = false
[protected]
 

Low-level: Create an action. 'key' is only a descriptive text, no true accelerator.

QAction * YQPkgObjList::createAction PMSelectable::UI_Status  status,
const QString &  key = QString::null,
bool  enabled = false
[protected]
 

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.

void YQPkgObjList::createActions  )  [protected]
 

Create the actions for the context menus. Note: This is intentionally not virtual!

Reimplemented in YQPkgList.

void YQPkgObjList::createInstalledContextMenu  )  [protected, virtual]
 

Create the context menu for installed items.

Reimplemented in YQPkgList, and YQPkgYouPatchList.

void YQPkgObjList::createNotInstalledContextMenu  )  [protected, virtual]
 

Create the context menu for items that are not installed.

Reimplemented in YQPkgList, and YQPkgYouPatchList.

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.

QPopupMenu * YQPkgObjList::installedContextMenu  )  [protected, virtual]
 

Returns the context menu for items that are not installed. Creates the menu upon the first call.

int YQPkgObjList::instVersionCol  )  const [inline]
 

void YQPkgObjList::keyPressEvent QKeyEvent *  ev  )  [protected, virtual]
 

Event handler for keyboard input. Only very special keys are processed here.

Reimplemented from QListView / QWidget.

Reimplemented in YQPkgYouPatchList.

void YQPkgObjList::message const QString &  text  )  [virtual, slot]
 

Display a one-line message in the list.

Reimplemented in YQPkgYouPatchList.

int YQPkgObjList::nameCol  )  const [inline]
 

QPopupMenu * YQPkgObjList::notInstalledContextMenu  )  [protected, virtual]
 

Returns the context menu for items that are installed. Creates the menu upon the first call.

void YQPkgObjList::pkgObjClicked int  button,
QListViewItem *  item,
int  col,
const QPoint &  pos
[virtual, slot]
 

Dispatcher slot for mouse click: cycle status depending on column.

Reimplemented in YQPkgList.

void YQPkgObjList::selectionChanged PMObjectPtr  pmObj  )  [signal]
 

Emitted when a PMObject is selected. May be called with a null poiner if no PMObject is selected.

void YQPkgObjList::selectionChangedInternal QListViewItem *  item  )  [protected, virtual, slot]
 

Dispatcher slot for selection change - internal only.

void YQPkgObjList::selectNextItem  )  [slot]
 

Select the next item, i.e. move the selection one item further down the list.

void YQPkgObjList::sendStatusChanged  )  [inline, slot]
 

Emit a statusChanged() signal for the specified PMObject.

void YQPkgObjList::setAllItemStatus PMSelectable::UI_Status  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 PMObjects to 'update' that really come with a newer version.

void YQPkgObjList::setCurrentDelete  )  [inline, slot]
 

void YQPkgObjList::setCurrentDontInstall  )  [inline, slot]
 

void YQPkgObjList::setCurrentInstall  )  [inline, slot]
 

void YQPkgObjList::setCurrentKeepInstalled  )  [inline, slot]
 

void YQPkgObjList::setCurrentProtected  )  [inline, slot]
 

void YQPkgObjList::setCurrentStatus PMSelectable::UI_Status  newStatus,
bool  selectNextItem = false
 

Sets the currently selected item's status. Automatically selects the next item if 'selectNextItem' is 'true'.

void YQPkgObjList::setCurrentTaboo  )  [inline, slot]
 

void YQPkgObjList::setCurrentUpdate  )  [inline, slot]
 

void YQPkgObjList::setEditable bool  editable = true  )  [inline]
 

Set the list's editable status.

void YQPkgObjList::setListDelete  )  [inline, slot]
 

void YQPkgObjList::setListDontInstall  )  [inline, slot]
 

void YQPkgObjList::setListInstall  )  [inline, slot]
 

void YQPkgObjList::setListKeepInstalled  )  [inline, slot]
 

void YQPkgObjList::setListProtected  )  [inline, slot]
 

void YQPkgObjList::setListTaboo  )  [inline, slot]
 

void YQPkgObjList::setListUpdate  )  [inline, slot]
 

void YQPkgObjList::setListUpdateForce  )  [inline, slot]
 

int YQPkgObjList::sizeCol  )  const [inline]
 

void YQPkgObjList::statusChanged  )  [signal]
 

Emitted when the status of a PMObject is changed.

int YQPkgObjList::statusCol  )  const [inline]
 

QPixmap YQPkgObjList::statusIcon PMSelectable::UI_Status  status,
bool  enabled = true,
bool  bySelection = false
[virtual]
 

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.

QString YQPkgObjList::statusText PMSelectable::UI_Status  status  )  const [virtual]
 

Returns a short ( one line ) descriptive text for a PMObject status.

int YQPkgObjList::summaryCol  )  const [inline]
 

void YQPkgObjList::updateActions  )  [virtual, slot]
 

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.

void YQPkgObjList::updateActions YQPkgObjListItem item  )  [virtual, slot]
 

Update the internal actions: What actions are available for 'item'?

Reimplemented in YQPkgList.

int YQPkgObjList::versionCol  )  const [inline]
 


Member Data Documentation

bool YQPkgObjList::_editable [protected]
 

QPopupMenu* YQPkgObjList::_installedContextMenu [protected]
 

int YQPkgObjList::_instVersionCol [protected]
 

int YQPkgObjList::_nameCol [protected]
 

QPopupMenu* YQPkgObjList::_notInstalledContextMenu [protected]
 

int YQPkgObjList::_sizeCol [protected]
 

int YQPkgObjList::_statusCol [protected]
 

int YQPkgObjList::_summaryCol [protected]
 

int YQPkgObjList::_versionCol [protected]
 

QAction* YQPkgObjList::actionSetCurrentDelete
 

QAction* YQPkgObjList::actionSetCurrentDontInstall
 

QAction* YQPkgObjList::actionSetCurrentInstall
 

QAction* YQPkgObjList::actionSetCurrentKeepInstalled
 

QAction* YQPkgObjList::actionSetCurrentProtected
 

QAction* YQPkgObjList::actionSetCurrentTaboo
 

QAction* YQPkgObjList::actionSetCurrentUpdate
 

QAction* YQPkgObjList::actionSetListDelete
 

QAction* YQPkgObjList::actionSetListDontInstall
 

QAction* YQPkgObjList::actionSetListInstall
 

QAction* YQPkgObjList::actionSetListKeepInstalled
 

QAction* YQPkgObjList::actionSetListProtected
 

QAction* YQPkgObjList::actionSetListTaboo
 

QAction* YQPkgObjList::actionSetListUpdate
 

QAction* YQPkgObjList::actionSetListUpdateForce
 


The documentation for this class was generated from the following files:
Generated on Wed Nov 12 06:11:17 2008 for yast2-qt by  doxygen 1.3.9.1