44 #include <YQPkgObjList.h> 46 #include <QResizeEvent> 73 int srpmStatusCol()
const {
return _srpmStatusCol; }
81 void exportList(
const QString filename,
bool interactive )
const;
143 QTreeWidgetItem * item,
145 const QPoint & pos );
168 void setInstallCurrentSourceRpm() { setInstallCurrentSourceRpm(
true ); }
169 void setDontInstallCurrentSourceRpm() { setInstallCurrentSourceRpm(
false ); }
171 void setInstallListSourceRpms() { setInstallListSourceRpms(
true ); }
172 void setDontInstallListSourceRpms() { setInstallListSourceRpms(
false ); }
224 void setInstallCurrentSourceRpm(
bool inst,
bool selectNextItem =
false );
229 void setInstallListSourceRpms(
bool inst );
258 QMenu * _sourceRpmContextMenu;
260 int _optimalColWidth_statusIcon;
261 int _optimalColWidth_name;
262 int _optimalColWidth_summary;
263 int _optimalColWidth_version;
264 int _optimalColWidth_instVersion;
265 int _optimalColWidth_size;
270 QAction * actionInstallSourceRpm;
271 QAction * actionDontInstallSourceRpm;
272 QAction * actionInstallListSourceRpms;
273 QAction * actionDontInstallListSourceRpms;
329 virtual bool operator< (
const QTreeWidgetItem & other )
const;
345 virtual QString
toolTip(
int column );
361 int srpmStatusCol()
const {
return _pkgList->srpmStatusCol(); }
380 #endif // ifndef YQPkgList_h void exportList(const QString filename, bool interactive) const
Save the pkg list to a file.
Abstract base class to display a list of zypp::ResObjects.
ZyppPkg zyppPkg() const
Returns the original object within the package manager backend.
void addPkgItem(ZyppSel selectable, ZyppPkg zyppPkg)
Add a pkg to the list.
int globalSetPkgStatus(ZyppStatus newStatus, bool force, bool countOnly)
Set the status of all packages in the pool to a new value.
void toggleSourceRpmStatus()
Cycle the source package status to the next valid value.
virtual QSize sizeHint() const
Reimplemented from QListView / QWidget: Reserve a reasonable amount of space.
virtual void createInstalledContextMenu()
Create the context menu for installed items.
void resetOptimalColumnWidthValues()
Resets the optimal column width values.
virtual void pkgObjClicked(int button, QTreeWidgetItem *item, int col, const QPoint &pos)
Dispatcher slot for mouse click: Take care of source RPM status.
YQPkgListItem(YQPkgList *pkgList, ZyppSel selectable, ZyppPkg zyppPkg)
Constructor.
virtual void updateActions(YQPkgObjListItem *item)
Update the internal actions: What actions are available for 'item'?
bool isDimmed() const
Returns true if this package is to be displayed dimmed, i.e.
static bool haveInstalledPkgs()
Returns 'true' if there are any installed packages.
bool hasSourceRpm() const
Returns whether or not a source RPM is available for this package.
virtual bool operator<(const QTreeWidgetItem &other) const
sorting function
void optimizeColumnWidths()
Optimizes the column widths depending on content and the available horizontal space.
void addPkgItemDimmed(ZyppSel selectable, ZyppPkg zyppPkg)
Add a pkg to the list, but display it dimmed (grey text foreground rather than normal black)...
YQPkgList * pkgList()
Returns the parent package list.
void selectNextItem()
Select the next item, i.e.
Display a list of zypp::Package objects.
virtual void updateData()
Update this item's data completely.
virtual void createNotInstalledContextMenu()
Create the context menu for items that are not installed.
void setSourceRpmIcon()
Set the suitable icon for the source RPM status.
void resort()
Sort the tree widget again according to the column selected and its current sort order.
YQPkgList(QWidget *parent)
Constructor.
void clear()
Clears the tree-widgets content, resets the optimal column width values.
void setDimmed(bool d=true)
Set the 'dimmed' flag.
bool installSourceRpm() const
Returns the source RPM package status: Should the source RPM be installed?
ZyppSel selectable() const
Returns the original selectable within the package manager backend.
virtual QString toolTip(int column)
Returns a tool tip text for a specific column of this item.
void updateOptimalColumnWidthValues(ZyppSel selectable, ZyppPkg zyppPkg)
Set and save optimal column widths depending on content only There is currently no way to get the opt...
virtual QMenu * addAllInListSubMenu(QMenu *menu)
Add a submenu "All in this list..." to 'menu'.
void setInstallSourceRpm(bool installSourceRpm)
Set the source RPM status.
void createActions()
Create ( additional ) actions for the context menus.
void createSourceRpmContextMenu()
Create context menu for source RPMs.
void askExportList() const
Ask for a file name and save the current pkg list to file.
void resizeEvent(QResizeEvent *event)
Handler for resize events.
virtual ~YQPkgListItem()
Destructor.
virtual ~YQPkgList()
Destructor.