libyui-qt-pkg
YQPkgProductList.h
1 /**************************************************************************
2 Copyright (C) 2000 - 2010 Novell, Inc.
3 All Rights Reserved.
4 
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9 
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 
19 **************************************************************************/
20 
21 
22 /*---------------------------------------------------------------------\
23 | |
24 | __ __ ____ _____ ____ |
25 | \ \ / /_ _/ ___|_ _|___ \ |
26 | \ V / _` \___ \ | | __) | |
27 | | | (_| |___) || | / __/ |
28 | |_|\__,_|____/ |_| |_____| |
29 | |
30 | core system |
31 | (C) SuSE GmbH |
32 \----------------------------------------------------------------------/
33 
34  File: YQPkgProductList.h
35 
36  Author: Stefan Hundhammer <shundhammer.de>
37 
38 /-*/
39 
40 
41 #ifndef YQPkgProductList_h
42 #define YQPkgProductList_h
43 
44 #include <string>
45 #include "YQPkgObjList.h"
46 
47 using std::string;
48 
50 
51 
56 {
57  Q_OBJECT
58 
59 public:
60 
64  YQPkgProductList( QWidget * parent );
65 
69  virtual ~YQPkgProductList();
70 
71 
72 public slots:
73 
79  void addProductItem( ZyppSel selectable,
80  ZyppProduct zyppProduct );
81 
85  void fillList();
86 
87 
88 public:
89 
94 
98  int vendorCol() const { return _vendorCol; }
99 
100 
101 protected:
102 
103 
104  // Data members
105 
106  int _vendorCol;
107 };
108 
109 
110 
112 {
113 public:
114 
119  YQPkgProductListItem( YQPkgProductList * productList,
120  ZyppSel selectable,
121  ZyppProduct zyppProduct );
122 
126  virtual ~YQPkgProductListItem();
127 
131  ZyppProduct zyppProduct() const { return _zyppProduct; }
132 
133 
134  // Columns
135 
136  int statusCol() const { return _productList->statusCol(); }
137  int summaryCol() const { return _productList->summaryCol(); }
138  int versionCol() const { return _productList->versionCol(); }
139  int vendorCol() const { return _productList->vendorCol(); }
140 
141 
142 protected:
143 
150  virtual void applyChanges();
151 
152 
153  // Data members
154 
155  YQPkgProductList * _productList;
156  ZyppProduct _zyppProduct;
157 };
158 
159 
160 #endif // ifndef YQPkgProductList_h
virtual void applyChanges()
Definition: YQPkgProductList.cc:170
Abstract base class to display a list of zypp::ResObjects. Handles most generic stuff like setting st...
Definition: YQPkgObjList.h:68
virtual ~YQPkgProductList()
Definition: YQPkgProductList.cc:89
YQPkgProductListItem(YQPkgProductList *productList, ZyppSel selectable, ZyppProduct zyppProduct)
Definition: YQPkgProductList.cc:140
void fillList()
Definition: YQPkgProductList.cc:96
int vendorCol() const
Definition: YQPkgProductList.h:98
YQPkgProductList(QWidget *parent)
Definition: YQPkgProductList.cc:57
ZyppProduct zyppProduct() const
Definition: YQPkgProductList.h:131
virtual ~YQPkgProductListItem()
Definition: YQPkgProductList.cc:161
ZyppSel selectable() const
Definition: YQPkgObjList.h:454
Definition: YQPkgObjList.h:414
Definition: YQPkgProductList.h:111
Display a list of zypp::Product objects.
Definition: YQPkgProductList.h:55
YQPkgProductListItem * selection() const
void addProductItem(ZyppSel selectable, ZyppProduct zyppProduct)
Definition: YQPkgProductList.cc:123