libyui-qt-pkg  2.45.15
YQPkgUpdateProblemFilterView.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: YQPkgUpdateProblemFilterView.h
35 
36  Author: Stefan Hundhammer <sh@suse.de>
37 
38 /-*/
39 
40 
41 #ifndef YQPkgUpdateProblemFilterView_h
42 #define YQPkgUpdateProblemFilterView_h
43 
44 
45 #include "YQZypp.h"
46 #include <QTextBrowser>
47 #include "YQPkgSelMapper.h"
48 
49 
50 /**
51  * @short Filter view for packages that made problems during update
52  **/
53 class YQPkgUpdateProblemFilterView : public QTextBrowser
54 {
55  Q_OBJECT
56 
57 public:
58 
59  /**
60  * Constructor
61  **/
62  YQPkgUpdateProblemFilterView( QWidget * parent );
63 
64  /**
65  * Destructor
66  **/
68 
69  /**
70  * Check if there are any problematic packages at all, i.e. if it is
71  * worthwhile to create this widget at all
72  **/
73  static bool haveProblematicPackages();
74 
75 
76 public slots:
77 
78  /**
79  * Filter according to the view's rules and current selection.
80  * Emits those signals:
81  * filterStart()
82  * filterMatch() for each pkg that matches the filter
83  * filterFinished()
84  **/
85  void filter();
86 
87  /**
88  * Same as filter(), but only if this widget is currently visible.
89  **/
90  void filterIfVisible();
91 
92 
93 signals:
94 
95  /**
96  * Emitted when the filtering starts. Use this to clear package lists
97  * etc. prior to adding new entries.
98  **/
99  void filterStart();
100 
101  /**
102  * Emitted during filtering for each pkg that matches the filter.
103  **/
104  void filterMatch( ZyppSel selectable,
105  ZyppPkg pkg );
106 
107  /**
108  * Emitted when filtering is finished.
109  **/
110  void filterFinished();
111 
112 
113 protected:
114 
115  YQPkgSelMapper _selMapper;
116 };
117 
118 
119 
120 #endif // ifndef YQPkgUpdateProblemFilterView_h
void filter()
Filter according to the view&#39;s rules and current selection.
Filter view for packages that made problems during update.
virtual ~YQPkgUpdateProblemFilterView()
Destructor.
void filterStart()
Emitted when the filtering starts.
void filterFinished()
Emitted when filtering is finished.
void filterIfVisible()
Same as filter(), but only if this widget is currently visible.
static bool haveProblematicPackages()
Check if there are any problematic packages at all, i.e.
Mapping from ZyppPkg to the correspoinding ZyppSel.
void filterMatch(ZyppSel selectable, ZyppPkg pkg)
Emitted during filtering for each pkg that matches the filter.
YQPkgUpdateProblemFilterView(QWidget *parent)
Constructor.