libyui

/data/gitorious.org/libyui/libyui-master/src/YPackageSelector.h

00001 /**************************************************************************
00002 Copyright (C) 2000 - 2010 Novell, Inc.
00003 All Rights Reserved.
00004 
00005 This program is free software; you can redistribute it and/or modify
00006 it under the terms of the GNU General Public License as published by
00007 the Free Software Foundation; either version 2 of the License, or
00008 (at your option) any later version.
00009 
00010 This program is distributed in the hope that it will be useful,
00011 but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 GNU General Public License for more details.
00014 
00015 You should have received a copy of the GNU General Public License along
00016 with this program; if not, write to the Free Software Foundation, Inc.,
00017 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00018 
00019 **************************************************************************/
00020 
00021 
00022 /*---------------------------------------------------------------------\
00023 |                                                                      |
00024 |                      __   __    ____ _____ ____                      |
00025 |                      \ \ / /_ _/ ___|_   _|___ \                     |
00026 |                       \ V / _` \___ \ | |   __) |                    |
00027 |                        | | (_| |___) || |  / __/                     |
00028 |                        |_|\__,_|____/ |_| |_____|                    |
00029 |                                                                      |
00030 |                               core system                            |
00031 |                                                        (C) SuSE GmbH |
00032 \----------------------------------------------------------------------/
00033 
00034   File:         YPackageSelector.h
00035 
00036   Author:       Stefan Hundhammer <sh@suse.de>
00037 
00038 /-*/
00039 
00040 #ifndef YPackageSelector_h
00041 #define YPackageSelector_h
00042 
00043 #include "YWidget.h"
00044 
00045 #define YPkg_TestMode           1 << 0  // Test mode for debugging
00046 #define YPkg_OnlineUpdateMode   1 << 1  // Online update mode: Show patches
00047 #define YPkg_UpdateMode         1 << 2  // Start with "Update problems" filter view
00048 #define YPkg_SearchMode         1 << 3  // Start with "Search"  filter view
00049 #define YPkg_SummaryMode        1 << 4  // Start with "Summary" filter view
00050 #define YPkg_RepoMode           1 << 5  // Start with "Repositories" filter view
00051 #define YPkg_RepoMgr            1 << 6  // Add "Manage Repositories" to menu
00052 #define YPkg_ConfirmUnsupported 1 << 7  // Confirm unsupported packages
00053 
00054 
00055 class YPackageSelector : public YWidget
00056 {
00057 protected:
00064     YPackageSelector( YWidget * parent, long modeFlags = 0 );
00065 
00066 public:
00071     virtual const char * widgetClass() const { return "YPackageSelector"; }
00072 
00076     bool testMode()             const { return _modeFlags & YPkg_TestMode;              }
00077     bool onlineUpdateMode()     const { return _modeFlags & YPkg_OnlineUpdateMode;      }
00078     bool updateMode()           const { return _modeFlags & YPkg_UpdateMode;            }
00079     bool searchMode()           const { return _modeFlags & YPkg_SearchMode;            }
00080     bool summaryMode()          const { return _modeFlags & YPkg_SummaryMode;           }
00081     bool repoMode()             const { return _modeFlags & YPkg_RepoMode;              }
00082     bool repoMgrEnabled()       const { return _modeFlags & YPkg_RepoMgr;               }
00083     bool confirmUnsupported()   const { return _modeFlags & YPkg_ConfirmUnsupported;    }
00084 
00085 protected:
00086     long _modeFlags;
00087 };
00088 
00089 
00090 #endif // YPackageSelector_h
 All Classes Functions Variables Enumerations Friends