privadmin.h

Go to the documentation of this file.
00001 // OSB library ************************************************ -*- C++ -*-
00006 /*
00007   AUTHOR(S): Stephan Broennimann (vb)
00008 
00009   RCS information
00010    $Name: OSB_060808 $
00011    $Revision: 1.11.2.1 $
00012 
00013   License
00014    OSB rating and billing library for communication networks
00015    Copyright (C) 2004, 2005, 2006  OSB systems
00016 
00017    This file may be distributed and/or modify under the terms of the
00018    GNU General Public License (GPL) as published by the Free Software
00019    Foundation which is provided in the file LICENSE.GPL included in the
00020    packaging of this file.
00021 
00022    The file is distributed in the hope that it will be useful, but WITHOUT
00023    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00024    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00025    for more details.
00026 
00027    Holders of a OSB Commercial License may use this file under the terms
00028    and conditions of this commercial license.
00029  */
00030 #ifndef _PRIVADMIN_H_
00031 #define _PRIVADMIN_H_
00032 
00033 // ************************************************************************
00034 // included header files
00035 // + standard includes
00036 
00037 // + libraries
00038 #include <osbid.h>
00039 
00040 // + local headers
00041 #include "adminwidget.h"
00042 
00043 // + class declarations
00044 class QWidgetStack;
00045 
00046 namespace OSB_LIB {
00047     class UserGroup;
00048 }
00049 
00050 namespace OSB_GUI {
00051     class WdgtUsrGroups;
00052     class WdgtGrpAccess;
00053     class WdgtModAccess;
00054 }
00055 
00056 // ************************************************************************
00057 // namespace extensions
00058 namespace OSB_GUI {
00059 
00060 // ************************************************************************
00061 // forward declarations
00062 
00063 // ************************************************************************
00064 // type definitions
00065 
00066 // ************************************************************************
00067 // class definitions
00071     class PrivAdminWidget : public AdminWidget {
00072         Q_OBJECT                        // for vim ->;
00073     public:
00075         enum MenuCmd {
00077             cmdRefresh = 0x01,
00079             cmdExport,
00081             wdgtMask   = 0x10,
00083             wdgtGroups = wdgtMask,
00085             wdgtAccess,
00087             wdgtModule
00088         };
00089 
00090     public:
00095         PrivAdminWidget(
00096                   AdminType type,
00097                   QWidget*  parent,
00098             const char*     name   = 0,
00099                   WFlags    flags  = 0
00100         );
00102         ~PrivAdminWidget();
00103     private:
00105         PrivAdminWidget(const PrivAdminWidget&);
00107         PrivAdminWidget& operator=(const PrivAdminWidget&);
00108 
00109     public:
00110         // documentation from base class
00111         std::string menuTitle() const;
00112         // documentation from base class
00113         QPopupMenu* menu();
00114         // documentation from base class
00115         void clearMenuAccels();
00116 
00118         void expModAccess();
00119 
00120     public slots:
00122         void languageChange();
00124         void menuEvent(int cmd);
00126         void readData();
00127 
00128     private:
00130         typedef OSB_LIB::Id<OSB_LIB::UserGroup> GrpId;
00131 
00133         GrpId curGroup() const;
00134 
00135     private slots:
00137         void cfgGroup(const GrpId grpId);
00138 
00139     private:
00141         QPopupMenu* menu_;
00143         QWidgetStack* privWidgets_;
00145         WdgtUsrGroups* grps_;
00147         WdgtGrpAccess* grpAccess_;
00149         WdgtModAccess* modAccess_;
00150     };                                  // class PrivAdminWidget
00151 }                                       // namespace OSB_GUI
00152 
00153 // ************************************************************************
00154 // inline definitions
00155 namespace OSB_GUI {
00156 }                                       // namespace OSB_GUI
00157 #endif                                  // #ifndef _PRIVADMIN_H_

Generated on Sat Sep 2 14:17:37 2006 for OSB Library by  doxygen 1.4.7