libyui-ncurses-pkg
NCPkgMenuDeps.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: NCPkgMenuDeps.cc
37 
38  Author: Hedgehog Painter <kmachalkova@suse.cz>
39 
40 /-*/
41 #ifndef NCPkgMenuDeps_h
42 #define NCPkgMenuDeps_h
43 
44 #include <string>
45 
46 #include <yui/ncurses/NCurses.h>
47 #include <yui/ncurses/NCi18n.h>
48 #include <yui/ncurses/NCMenuButton.h>
49 #include <yui/ncurses/NCPopupInfo.h>
50 
51 #include "NCPkgPopupTable.h"
52 #include "NCZypp.h"
53 
54 
55 class NCPackageSelector;
56 
57 class NCPkgMenuDeps : public NCMenuButton
58 {
59  NCPkgMenuDeps & operator=( const NCPkgMenuDeps & );
60  NCPkgMenuDeps ( const NCPkgMenuDeps & );
61 
62 public:
63 
64  NCPackageSelector *pkg;
65 
66  YItemCollection items;
67 
68  YMenuItem *autoCheckDeps;
69  YMenuItem *checkNow;
70  YMenuItem *verifySystem;
71  YMenuItem *verifySystemOpt;
72  YMenuItem *installRecommendedOpt;
73  YMenuItem *installRecommendedNow;
74  YMenuItem *cleanDepsOnRemove;
75  YMenuItem *allowVendorChange;
76  YMenuItem *testCase;
77 
78  NCPkgMenuDeps (YWidget *parent, std::string label, NCPackageSelector *pkger);
79  virtual ~NCPkgMenuDeps();
80 
81  void createLayout();
82 
83  bool handleEvent (const NCursesEvent & event);
84 
85  bool checkDependencies();
86 
87  bool generateTestcase();
88 
89  bool setAutoCheck();
90 
91  bool setCleanDepsOnRemove();
92 
93  bool setInstallRecommended();
94 
95  bool doInstallRecommended();
96 
97  bool setAllowVendorChange();
98 
99  bool setVerifySystem();
100 
101  bool verify();
102 
103  void setSelected( YMenuItem *item, bool selected);
104 };
105 
106 #endif
Definition: NCPkgMenuDeps.h:57
Definition: NCPackageSelector.h:109