]> icculus.org git repositories - duncan/yast2-qt4.git/blob - src/pkg/YQPkgUpdateProblemFilterView.h
misc compile
[duncan/yast2-qt4.git] / src / pkg / YQPkgUpdateProblemFilterView.h
1 /*---------------------------------------------------------------------\
2 |                                                                      |
3 |                      __   __    ____ _____ ____                      |
4 |                      \ \ / /_ _/ ___|_   _|___ \                     |
5 |                       \ V / _` \___ \ | |   __) |                    |
6 |                        | | (_| |___) || |  / __/                     |
7 |                        |_|\__,_|____/ |_| |_____|                    |
8 |                                                                      |
9 |                               core system                            |
10 |                                                        (C) SuSE GmbH |
11 \----------------------------------------------------------------------/
12
13   File:       YQPkgUpdateProblemFilterView.h
14
15   Author:     Stefan Hundhammer <sh@suse.de>
16
17 /-*/
18
19
20 #ifndef YQPkgUpdateProblemFilterView_h
21 #define YQPkgUpdateProblemFilterView_h
22
23
24 #include "YQZypp.h"
25 #include <QTextBrowser>
26 #include "YQPkgSelMapper.h"
27
28
29 /**
30  * @short Filter view for packages that made problems during update
31  **/
32 class YQPkgUpdateProblemFilterView : public QTextBrowser
33 {
34     Q_OBJECT
35
36 public:
37
38     /**
39      * Constructor
40      **/
41     YQPkgUpdateProblemFilterView( QWidget * parent );
42
43     /**
44      * Destructor
45      **/
46     virtual ~YQPkgUpdateProblemFilterView();
47
48     /**
49      * Check if there are any problematic packages at all, i.e. if it is
50      * worthwhile to create this widget at all
51      **/
52     static bool haveProblematicPackages();
53
54     
55 public slots:
56
57     /**
58      * Filter according to the view's rules and current selection.
59      * Emits those signals:
60      *    filterStart()
61      *    filterMatch() for each pkg that matches the filter
62      *    filterFinished()
63      **/
64     void filter();
65
66     /**
67      * Same as filter(), but only if this widget is currently visible.
68      **/
69     void filterIfVisible();
70
71
72 signals:
73
74     /**
75      * Emitted when the filtering starts. Use this to clear package lists
76      * etc. prior to adding new entries.
77      **/
78     void filterStart();
79
80     /**
81      * Emitted during filtering for each pkg that matches the filter.
82      **/
83     void filterMatch( ZyppSel   selectable,
84                       ZyppPkg   pkg );
85
86     /**
87      * Emitted when filtering is finished.
88      **/
89     void filterFinished();
90
91     
92 protected:
93     
94     YQPkgSelMapper _selMapper;
95 };
96
97
98
99 #endif // ifndef YQPkgUpdateProblemFilterView_h