libyui-ncurses-pkg  2.44.4
 All Classes Functions
NCPkgSearchSettings.cc
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: NCPkgFilterMain.cc
37 
38  Author: Hedgehog Painter <kmachalkova@suse.cz>
39 
40 /-*/
41 
42 #include "NCPkgSearchSettings.h"
43 #include "NCPkgStrings.h"
44 
45 /*
46  Textdomain "ncurses-pkg"
47 */
48 
49 NCPkgSearchSettings::NCPkgSearchSettings ( YWidget *parent, std::string label)
50  : NCMultiSelectionBox ( parent, label)
51 {
52  createLayout();
53 }
54 
55 NCPkgSearchSettings::~NCPkgSearchSettings()
56 {
57 
58 }
59 
60 void NCPkgSearchSettings::createLayout()
61 {
62  checkName = new YItem ( _( "Name of the Package" ), true);
63  items.push_back (checkName);
64  checkSummary = new YItem ( _( "Summary" ), true);
65  items.push_back (checkSummary);
66  checkKeywords = new YItem ( _( "Keywords" ));
67  items.push_back (checkKeywords);
68  checkDescr = new YItem ( _( "Description (time-consuming)" ));
69  items.push_back (checkDescr);
70  checkProvides = new YItem ( _( "Provides" ));
71  items.push_back (checkProvides);
72  checkRequires = new YItem ( _( "Required by" ));
73  items.push_back (checkRequires);
74 
75  addItems( items );
76 }
77 
78 bool NCPkgSearchSettings::doCheckName()
79 {
80  return checkName->selected();
81 }
82 bool NCPkgSearchSettings::doCheckSummary()
83 {
84  return checkSummary->selected();
85 }
86 bool NCPkgSearchSettings::doCheckKeywords()
87 {
88  return checkKeywords->selected();
89 }
90 bool NCPkgSearchSettings::doCheckDescr()
91 {
92  return checkDescr->selected();
93 }
94 bool NCPkgSearchSettings::doCheckProvides()
95 {
96  return checkProvides->selected();
97 }
98 bool NCPkgSearchSettings::doCheckRequires()
99 {
100  return checkRequires->selected();
101 }
102