libyui-qt-pkg  2.45.6
YQPkgRepoFilterView.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: YQPkgRepoFilterView.h
35 
36  Author: Stefan Hundhammer <sh@suse.de>
37 
38 /-*/
39 
40 
41 #ifndef YQPkgRepoFilterView_h
42 #define YQPkgRepoFilterView_h
43 
44 #include "YQZypp.h"
45 #include <QWidget>
46 
47 
48 class YQPkgRepoList;
49 class QY2ComboTabWidget;
53 
54 
55 class YQPkgRepoFilterView : public QWidget
56 {
57  Q_OBJECT
58 
59 public:
60 
61  /**
62  * Constructor
63  **/
64  YQPkgRepoFilterView( QWidget * parent );
65 
66  /**
67  * Destructor
68  **/
69  virtual ~YQPkgRepoFilterView();
70 
71  /**
72  * Current selected repository, or if nothing is selected
73  */
74  zypp::Repository selectedRepo() const;
75 
76 signals:
77 
78  /**
79  * Emitted when the filtering starts. Use this to clear package lists
80  * etc. prior to adding new entries.
81  **/
82  void filterStart();
83 
84  /**
85  * Emitted during filtering for each pkg that matches the filter
86  * and the candidate package comes from the respective repository
87  **/
88  void filterMatch( ZyppSel selectable,
89  ZyppPkg pkg );
90 
91  /**
92  * Emitted during filtering for each pkg that matches the filter
93  * and the candidate package does not come from the respective repository
94  **/
95  void filterNearMatch( ZyppSel selectable,
96  ZyppPkg pkg );
97 
98  /**
99  * Emitted when filtering is finished.
100  **/
101  void filterFinished();
102 
103 public slots:
104 
105  /**
106  * Filter according to the view's rules and current selection.
107  * Emits those signals:
108  * filterStart()
109  * filterMatch() for each pkg that matches the filter
110  * filterFinished()
111  **/
112  void filter();
113 
114  /**
115  * Same as filter(), but only if this widget is currently visible.
116  **/
117  void filterIfVisible();
118 
119 
120 protected slots:
121 
122  /**
123  * Propagate a filter match from the primary filter
124  * and appy any selected secondary filter(s) to it
125  **/
126  void primaryFilterMatch( ZyppSel selectable,
127  ZyppPkg pkg );
128 
129  /**
130  * Propagate a filter near match from the primary filter
131  * and appy any selected secondary filter(s) to it
132  **/
133  void primaryFilterNearMatch( ZyppSel selectable,
134  ZyppPkg pkg );
135 
136 protected:
137 
138  /**
139  * Widget layout for the secondary filters
140  **/
141  QWidget * layoutSecondaryFilters( QWidget * parent );
142 
143  /**
144  * Check if pkg matches the the currently selected secondary filter
145  **/
146  bool secondaryFilterMatch( ZyppSel selectable,
147  ZyppPkg pkg );
148 
149 
150  // Data members
151 
152  YQPkgRepoList * _repoList;
153  QY2ComboTabWidget * _secondaryFilters;
154  QWidget * _allPackages;
155  QWidget *_unmaintainedPackages;
156  YQPkgRpmGroupTagsFilterView * _rpmGroupTagsFilterView;
157  YQPkgSearchFilterView * _searchFilterView;
158  YQPkgStatusFilterView * _statusFilterView;
159 };
160 
161 
162 
163 #endif // ifndef YQPkgRepoFilterView_h
RPM group tags filter view: Display the RPM group tags tree and emit signals if any group tag is sele...
void filterNearMatch(ZyppSel selectable, ZyppPkg pkg)
Emitted during filtering for each pkg that matches the filter and the candidate package does not come...
void filterFinished()
Emitted when filtering is finished.
QWidget * layoutSecondaryFilters(QWidget *parent)
Widget layout for the secondary filters.
YQPkgRepoFilterView(QWidget *parent)
Constructor.
void filterIfVisible()
Same as filter(), but only if this widget is currently visible.
Filter view for searching within packages.
void filter()
Filter according to the view&#39;s rules and current selection.
Filter view for packages that made problems during update.
Display a list of zypp::Selection objects.
Definition: YQPkgRepoList.h:58
bool secondaryFilterMatch(ZyppSel selectable, ZyppPkg pkg)
Check if pkg matches the the currently selected secondary filter.
void primaryFilterMatch(ZyppSel selectable, ZyppPkg pkg)
Propagate a filter match from the primary filter and appy any selected secondary filter(s) to it...
void filterMatch(ZyppSel selectable, ZyppPkg pkg)
Emitted during filtering for each pkg that matches the filter and the candidate package comes from th...
void primaryFilterNearMatch(ZyppSel selectable, ZyppPkg pkg)
Propagate a filter near match from the primary filter and appy any selected secondary filter(s) to it...
void filterStart()
Emitted when the filtering starts.
virtual ~YQPkgRepoFilterView()
Destructor.
zypp::Repository selectedRepo() const
Current selected repository, or if nothing is selected.