1 /*---------------------------------------------------------------------\
3 | __ __ ____ _____ ____ |
4 | \ \ / /_ _/ ___|_ _|___ \ |
5 | \ V / _` \___ \ | | __) | |
6 | | | (_| |___) || | / __/ |
7 | |_|\__,_|____/ |_| |_____| |
11 \----------------------------------------------------------------------/
13 File: YQPkgProductList.h
15 Author: Stefan Hundhammer <sh@suse.de>
20 #ifndef YQPkgProductList_h
21 #define YQPkgProductList_h
24 #include "YQPkgObjList.h"
28 class YQPkgProductListItem;
32 * @short Display a list of zypp::Product objects.
34 class YQPkgProductList : public YQPkgObjList
43 YQPkgProductList( QWidget * parent );
48 virtual ~YQPkgProductList();
54 * Add a product to the list. Connect a filter's filterMatch() signal to
55 * this slot. Remember to connect filterStart() to clear() (inherited from
58 void addProductItem( ZyppSel selectable,
59 ZyppProduct zyppProduct );
62 * Fill the product list.
70 * Returns the currently selected item or 0 if there is none.
72 YQPkgProductListItem * selection() const;
75 * Returns the column for the product's vendor.
77 int vendorCol() const { return _vendorCol; }
90 class YQPkgProductListItem: public YQPkgObjListItem
95 * Constructor. Creates a YQPkgProductList item that corresponds to
98 YQPkgProductListItem( YQPkgProductList * productList,
100 ZyppProduct zyppProduct );
105 virtual ~YQPkgProductListItem();
108 * Returns the original zyppProduct object.
110 ZyppProduct zyppProduct() const { return _zyppProduct; }
115 int statusCol() const { return _productList->statusCol(); }
116 int summaryCol() const { return _productList->summaryCol(); }
117 int versionCol() const { return _productList->versionCol(); }
118 int vendorCol() const { return _productList->vendorCol(); }
124 * Propagate status changes in this list to other lists:
125 * Have the solver transact all products, patterns, etc.
127 * Reimplemented from YQPkgObjListItem.
129 virtual void applyChanges();
134 YQPkgProductList * _productList;
135 ZyppProduct _zyppProduct;
139 #endif // ifndef YQPkgProductList_h