00001 // OSB library ************************************************ -*- C++ -*- 00006 /* 00007 AUTHOR(S): Stephan Broennimann (vb) 00008 00009 RCS information 00010 $Name: OSB_060808 $ 00011 $Revision: 1.16.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 _RATINGCFG_H_ 00031 #define _RATINGCFG_H_ 00032 00033 // ************************************************************************ 00034 // included header files 00035 // + standard includes 00036 00037 // + libraries 00038 00039 // + local headers 00040 #include "adminwidget.h" 00041 00042 // + class declarations 00043 class QFrame; 00044 class QHBoxLayout; 00045 class QLabel; 00046 class QPushButton; 00047 class QSpacerItem; 00048 class QVBoxLayout; 00049 00050 namespace OSB_GUI { 00051 class CmbNetwork; // networkcombo.h 00052 class CmbNwElement; // networkcombo.h 00053 class LvRatingCfg; // ratingcfglv.h 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 RatingCfgAdmin : public AdminWidget { 00072 Q_OBJECT // for vim ->; 00073 private: 00075 enum MenuCmd { 00077 cmdDetail = 1, 00079 cmdAdd, 00081 cmdRemove, 00082 00084 cmdSave, 00085 00087 cmdConfigRp, 00088 00090 cmdLast = cmdConfigRp 00091 }; 00092 public: 00097 RatingCfgAdmin( 00098 AdminType type, 00099 QWidget* parent, 00100 const char* name = 0, 00101 WFlags flags = 0 00102 ); 00103 00105 ~RatingCfgAdmin(); 00106 00107 private: 00109 RatingCfgAdmin(const RatingCfgAdmin&); 00111 RatingCfgAdmin& operator=(const RatingCfgAdmin&); 00112 00113 public: 00114 // documentation from base 00115 void languageChange(); 00116 00117 // documentation from base class 00118 std::string menuTitle() const; 00119 // documentation from base class 00120 QPopupMenu* menu(); 00121 // documentation from base class 00122 void clearMenuAccels(); 00123 00124 private: 00126 void buildWidgets(); 00128 void buildMenu(); 00130 void configRatedParties(); 00131 00133 void addRpEval(); 00135 void removeRpEval(); 00143 bool save(bool closing); 00145 void closeEvent(QCloseEvent* e); 00146 00147 private slots: 00149 void showRpEval(); 00150 00158 void showNetworks(); 00165 void networkSelected(); 00169 void nwElementSelected(); 00170 00172 void menuEvent(int cmd); 00173 00175 void enableMenuItems(); 00176 00177 private: 00184 bool dirty_; 00185 00187 QPopupMenu* menu_; 00188 00190 QLabel* tlNetwork_; 00192 CmbNetwork* cmbNetwork_; 00194 QLabel* tlElement_; 00196 CmbNwElement* cmbNwElement_; 00198 QSpacerItem* spCtl_; 00200 QFrame* lineCtl_; 00201 00203 QHBoxLayout* loCtl_; 00204 00206 LvRatingCfg* cfg_; 00207 00209 QVBoxLayout* layout_; 00210 }; // class RatingCfgAdmin 00211 } // namespace OSB_GUI 00212 00213 // ************************************************************************ 00214 // inline definitions 00215 namespace OSB_GUI { 00216 } // namespace OSB_GUI 00217 #endif // #ifndef _RATINGCFG_H_