libyui-ncurses-pkg
NCPkgFilterLocale.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: NCPkgFilterLocale.h
37 
38  Author: Bubli <kmachalkova@suse.cz>
39 
40 /-*/
41 
42 #ifndef NCPkgFilterLocale_h
43 #define NCPkgFilterLocale_h
44 
45 #include <vector>
46 #include <zypp/sat/LocaleSupport.h>
47 #include <yui/ncurses/NCTable.h>
48 
49 #include "NCPackageSelector.h"
50 #include "NCZypp.h"
51 
52 
53 class NCPkgLocaleTag : public YTableCell
54 {
55 
56 private:
57 
58  zypp::sat::LocaleSupport locale;
59 
60 public:
61 
62  NCPkgLocaleTag ( zypp::sat::LocaleSupport locale, std::string status );
63 
64  ~NCPkgLocaleTag() {};
65 
66  zypp::sat::LocaleSupport getLocale() const { return locale; }
67 
68 };
69 
70 class NCPkgLocaleTable : public NCTable
71 {
72 private:
73 
74  NCPkgLocaleTable & operator=( const NCPkgLocaleTable & );
76 
77  NCPackageSelector *packager;
78 public:
79 
80  NCPkgLocaleTable ( YWidget *parent, YTableHeader *tableHeader, NCPackageSelector *pkg);
81 
82  virtual ~NCPkgLocaleTable() {};
83 
84  void fillHeader();
85  void addLine ( zypp::sat::LocaleSupport, const std::vector <std::string> & cols, std::string status );
86  void fillLocaleList();
87  void showLocalePackages();
88 
89  NCPkgLocaleTag* getTag (const int & index );
90  zypp::sat::LocaleSupport getLocale( int index );
91  std::string status( zypp::Locale lang );
92  void cycleStatus();
93  NCursesEvent wHandleInput( wint_t ch );
94 };
95 
96 #endif
Definition: NCPkgFilterLocale.h:70
Definition: NCPkgFilterLocale.h:53
Definition: NCPackageSelector.h:109