libyui-qt-pkg
YQPkgStatusFilterView.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: YQPkgStatusFilterView.h
35 
36  Author: Stefan Hundhammer <shundhammer.de>
37 
38 /-*/
39 
40 
41 #ifndef YQPkgStatusFilterView_h
42 #define YQPkgStatusFilterView_h
43 
44 #include "YQZypp.h"
45 #include <QWidget>
46 #include <QRegExp>
47 #include <QPixmap>
48 #include <QScrollArea>
49 
50 
51 class QComboBox;
52 class QCheckBox;
53 class QPushButton;
54 
55 
59 class YQPkgStatusFilterView : public QScrollArea
60 {
61  Q_OBJECT
62 
63 public:
64 
68  YQPkgStatusFilterView( QWidget * parent );
69 
73  virtual ~YQPkgStatusFilterView();
74 
79  virtual QSize minimumSizeHint() const;
80 
84  bool check( ZyppSel selectable,
85  ZyppObj pkg );
86 
87 
88 public slots:
89 
97  void filter();
98 
102  void filterIfVisible();
103 
104 
108  void clear();
109 
113  void showTransactions();
114 
119  void showManualTransactions();
120 
125  void showAutoTransactions();
126 
130  void showLocks();
131 
135  void showInstalled();
136 
140  void showNotInstalled();
141 
142 
143 signals:
144 
149  void filterStart();
150 
154  void filterMatch( ZyppSel selectable,
155  ZyppPkg pkg );
156 
160  void filterFinished();
161 
162 
163 protected:
164 
168  QCheckBox * addStatusCheckBox( QWidget * parent,
169  const QString & label,
170  const QPixmap & icon,
171  bool initiallyChecked );
172 
173  // Data members
174 
175  QCheckBox * _showAutoDel;
176  QCheckBox * _showAutoInstall;
177  QCheckBox * _showAutoUpdate;
178  QCheckBox * _showDel;
179  QCheckBox * _showInstall;
180  QCheckBox * _showKeepInstalled;
181  QCheckBox * _showNoInst;
182  QCheckBox * _showTaboo;
183  QCheckBox * _showProtected;
184  QCheckBox * _showUpdate;
185 
186  QPushButton * _refreshButton;
187 };
188 
189 
190 
191 #endif // ifndef YQPkgStatusFilterView_h
void filterIfVisible()
Definition: YQPkgStatusFilterView.cc:186
QCheckBox * addStatusCheckBox(QWidget *parent, const QString &label, const QPixmap &icon, bool initiallyChecked)
Definition: YQPkgStatusFilterView.cc:147
virtual ~YQPkgStatusFilterView()
Definition: YQPkgStatusFilterView.cc:139
void showManualTransactions()
Definition: YQPkgStatusFilterView.cc:282
void showLocks()
Definition: YQPkgStatusFilterView.cc:298
void showInstalled()
Definition: YQPkgStatusFilterView.cc:305
void showAutoTransactions()
Definition: YQPkgStatusFilterView.cc:290
void filterMatch(ZyppSel selectable, ZyppPkg pkg)
virtual QSize minimumSizeHint() const
Definition: YQPkgStatusFilterView.cc:179
Filter view for packages that made problems during update.
Definition: YQPkgStatusFilterView.h:59
void clear()
Definition: YQPkgStatusFilterView.cc:260
void showTransactions()
Definition: YQPkgStatusFilterView.cc:275
YQPkgStatusFilterView(QWidget *parent)
Definition: YQPkgStatusFilterView.cc:66
void filter()
Definition: YQPkgStatusFilterView.cc:194
void showNotInstalled()
Definition: YQPkgStatusFilterView.cc:311
bool check(ZyppSel selectable, ZyppObj pkg)
Definition: YQPkgStatusFilterView.cc:222