libyui-ncurses-pkg
NCPkgFilterClassification.h
1 /****************************************************************************
2 |
3 | Copyright (c) [2002-2011] Novell, Inc.
4 | All Rights Reserved.
5 |
6 | This program is free software; you can redistribute it and/or
7 | modify it under the terms of version 2 of the GNU General Public License as
8 | published by the Free Software Foundation.
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
16 | along with this program; if not, contact Novell, Inc.
17 |
18 | To contact Novell about this file by physical or electronic mail,
19 | you may find current contact information at www.novell.com
20 |
21 |***************************************************************************/
22 
23 
24 /*---------------------------------------------------------------------\
25 | |
26 | __ __ ____ _____ ____ |
27 | \ \ / /_ _/ ___|_ _|___ \ |
28 | \ V / _` \___ \ | | __) | |
29 | | | (_| |___) || | / __/ |
30 | |_|\__,_|____/ |_| |_____| |
31 | |
32 | core system |
33 | (C) SuSE GmbH |
34 \----------------------------------------------------------------------/
35 
36  File: NCPkgFilterClassification.h
37 
38  Author: Gabriele Mohr <gs@suse.com>
39 
40 /-*/
41 
42 #ifndef NCPkgFilterClassification_h
43 #define NCPkgFilterClassification_h
44 
45 #include <iosfwd>
46 #include <vector>
47 #include <string>
48 #include <algorithm>
49 
50 #include <yui/ncurses/NCPadWidget.h>
51 #include <yui/ncurses/NCPopup.h>
52 #include <yui/ncurses/NCPushButton.h>
53 #include <yui/ncurses/NCSelectionBox.h>
54 
55 #include "NCZypp.h"
56 
57 
58 class NCTable;
59 class NCPackageSelector;
60 
61 class NCPkgFilterClassification: public NCSelectionBox
62 {
63 public:
64 
72  NCPkgFilterClassification( YWidget *parent, NCPackageSelector *pkg);
73 
74  virtual ~NCPkgFilterClassification() {};
75 
76  void showRetractedInstalled();
77 
78  virtual NCursesEvent wHandleInput( wint_t ch );
79 
80 protected:
81 
82  YItem * currentPkgClass() const;
83  void setCurrentPkgClass( YItem * item );
84  int itemIndex( YItem * item ) const;
85 
86  bool showPackages();
87  void showDescription();
88 
89  bool check(ZyppSel selectable, ZyppPkg pkg, YItem * group );
90 
91 
92  // Data members
93 
94  NCPackageSelector *packager;
95 
96  YItem *recommended;
97  YItem *suggested;
98  YItem *orphaned;
99  YItem *unneeded;
100  YItem *multiversion;
101  YItem *retracted;
102  YItem *retractedInstalled;
103  YItem *all;
104 
105 private:
106 
109 
110 };
111 #endif
NCPkgFilterClassification(YWidget *parent, NCPackageSelector *pkg)
Definition: NCPkgFilterClassification.cc:69
Definition: NCPkgFilterClassification.h:61
Definition: NCPackageSelector.h:109