libyui
 
Loading...
Searching...
No Matches
YPackageSelector.h
1/*
2 Copyright (C) 2000-2012 Novell, Inc
3 This library is free software; you can redistribute it and/or modify
4 it under the terms of the GNU Lesser General Public License as
5 published by the Free Software Foundation; either version 2.1 of the
6 License, or (at your option) version 3.0 of the License. This library
7 is distributed in the hope that it will be useful, but WITHOUT ANY
8 WARRANTY; without even the implied warranty of MERCHANTABILITY or
9 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
10 License for more details. You should have received a copy of the GNU
11 Lesser General Public License along with this library; if not, write
12 to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
13 Floor, Boston, MA 02110-1301 USA
14*/
15
16
17/*-/
18
19 File: YPackageSelector.h
20
21 Author: Stefan Hundhammer <shundhammer@suse.de>
22
23/-*/
24
25#ifndef YPackageSelector_h
26#define YPackageSelector_h
27
28#include "YWidget.h"
29
30#define YPkg_TestMode 1 << 0 // Test mode for debugging
31#define YPkg_OnlineUpdateMode 1 << 1 // Online update mode: Show patches
32#define YPkg_UpdateMode 1 << 2 // Start with "Update problems" filter view
33#define YPkg_SearchMode 1 << 3 // Start with "Search" filter view
34#define YPkg_SummaryMode 1 << 4 // Start with "Summary" filter view
35#define YPkg_RepoMode 1 << 5 // Start with "Repositories" filter view
36#define YPkg_RepoMgr 1 << 6 // Add "Manage Repositories" to menu
37#define YPkg_ConfirmUnsupported 1 << 7 // Confirm unsupported packages
38#define YPkg_OnlineSearch 1 << 8 // Add "Search Online" to menu
39
44{
45protected:
52 YPackageSelector( YWidget * parent, long modeFlags = 0 );
53
54public:
59 virtual const char * widgetClass() const { return "YPackageSelector"; }
60
64 bool testMode() const { return _modeFlags & YPkg_TestMode; }
65 bool onlineUpdateMode() const { return _modeFlags & YPkg_OnlineUpdateMode; }
66 bool updateMode() const { return _modeFlags & YPkg_UpdateMode; }
67 bool searchMode() const { return _modeFlags & YPkg_SearchMode; }
68 bool summaryMode() const { return _modeFlags & YPkg_SummaryMode; }
69 bool repoMode() const { return _modeFlags & YPkg_RepoMode; }
70 bool repoMgrEnabled() const { return _modeFlags & YPkg_RepoMgr; }
71 bool confirmUnsupported() const { return _modeFlags & YPkg_ConfirmUnsupported; }
72 bool onlineSearchEnabled() const { return _modeFlags & YPkg_OnlineSearch; }
73
74protected:
75 long _modeFlags;
76};
77
78
79#endif // YPackageSelector_h
bool testMode() const
Definition YPackageSelector.h:64
YPackageSelector(YWidget *parent, long modeFlags=0)
Definition YPackageSelector.cc:32
virtual const char * widgetClass() const
Definition YPackageSelector.h:59
YWidget(YWidget *parent)
Definition YWidget.cc:106
YWidget * parent() const
Definition YWidget.cc:277