libyui-qt-pkg
YQPkgSecondaryFilterView.h
1 /**************************************************************************
2 Copyright (C) 2018 SUSE LLC
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 #ifndef YQPkgSecondaryFilterView_h
23 #define YQPkgSecondaryFilterView_h
24 
25 #include "YQZypp.h"
26 #include <QWidget>
27 
28 class QY2ComboTabWidget;
31 
32 
36 class YQPkgSecondaryFilterView : public QWidget
37 {
38  Q_OBJECT
39 
40 public:
41 
47  YQPkgSecondaryFilterView( QWidget * parent );
48 
52  virtual ~YQPkgSecondaryFilterView();
53 
59  void init(QWidget * primary_widget);
60 
61 signals:
62 
67  void filterStart();
68 
73  void filterMatch( ZyppSel selectable,
74  ZyppPkg pkg );
75 
80  void filterNearMatch( ZyppSel selectable,
81  ZyppPkg pkg );
82 
86  void filterFinished();
87 
88 public slots:
89 
97  void filter();
98 
102  void filterIfVisible();
103 
104 
105 protected slots:
106 
111  void primaryFilterMatch( ZyppSel selectable,
112  ZyppPkg pkg );
113 
118  void primaryFilterNearMatch( ZyppSel selectable,
119  ZyppPkg pkg );
120 
121 protected:
122 
126  QWidget * layoutSecondaryFilters( QWidget * parent, QWidget * primary_widget );
127 
131  bool secondaryFilterMatch( ZyppSel selectable,
132  ZyppPkg pkg );
133 
134  virtual void primaryFilter() {}
135  virtual void primaryFilterIfVisible() {}
136 
137 
138  // Data members
139  QY2ComboTabWidget * _secondaryFilters;
140  QWidget * _allPackages;
141  QWidget *_unmaintainedPackages;
142  YQPkgSearchFilterView * _searchFilterView;
143  YQPkgStatusFilterView * _statusFilterView;
144 };
145 
146 #endif // ifndef YQPkgSecondaryFilterView_h
void filterNearMatch(ZyppSel selectable, ZyppPkg pkg)
void filter()
Definition: YQPkgSecondaryFilterView.cc:149
Definition: YQPkgSecondaryFilterView.h:36
QWidget * layoutSecondaryFilters(QWidget *parent, QWidget *primary_widget)
Definition: YQPkgSecondaryFilterView.cc:86
void primaryFilterNearMatch(ZyppSel selectable, ZyppPkg pkg)
Definition: YQPkgSecondaryFilterView.cc:166
void init(QWidget *primary_widget)
Definition: YQPkgSecondaryFilterView.cc:44
void primaryFilterMatch(ZyppSel selectable, ZyppPkg pkg)
Definition: YQPkgSecondaryFilterView.cc:159
void filterIfVisible()
Definition: YQPkgSecondaryFilterView.cc:154
Filter view for searching within packages.
Definition: YQPkgSearchFilterView.h:63
YQPkgSecondaryFilterView(QWidget *parent)
Definition: YQPkgSecondaryFilterView.cc:39
Filter view for packages that made problems during update.
Definition: YQPkgStatusFilterView.h:59
void filterMatch(ZyppSel selectable, ZyppPkg pkg)
bool secondaryFilterMatch(ZyppSel selectable, ZyppPkg pkg)
Definition: YQPkgSecondaryFilterView.cc:174
virtual ~YQPkgSecondaryFilterView()
Definition: YQPkgSecondaryFilterView.cc:80