00001 // OSB library ************************************************ -*- C++ -*- 00006 /* 00007 AUTHOR(S): Stephan Broennimann (vb) 00008 00009 RCS information 00010 $Name: OSB_060808 $ 00011 $Revision: 1.2 $ 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 _INVMGMTWIDGET_H_ 00031 #define _INVMGMTWIDGET_H_ 00032 00033 // ************************************************************************ 00034 // included header files 00035 // + standard includes 00036 #include <list> 00037 00038 // + libraries 00039 00040 // + local headers 00041 #include "adminwidget.h" 00042 00043 // + class declarations 00044 namespace OSB_LIB { 00045 class InventoryPool; 00046 } 00047 namespace OSB_GUI { 00048 class LeId; 00049 } 00050 // Qt 00051 class QLabel; 00052 class QLineEdit; 00053 class QTextEdit; 00054 class QSpacerItem; 00055 class QHBoxLayout; 00056 class QVBoxLayout; 00057 class QPushButton; 00058 class QFrame; 00059 00060 // ************************************************************************ 00061 // namespace extensions 00062 namespace OSB_GUI { 00063 00064 // ************************************************************************ 00065 // forward declarations 00066 00067 // ************************************************************************ 00068 // type definitions 00069 00070 // ************************************************************************ 00071 // class definitions 00075 class InvMgmtWidget : public AdminWidget { 00076 Q_OBJECT // for vim ->; 00077 00078 private: 00080 typedef OSB_LIB::Id<OSB_LIB::InventoryPool> PoolId; 00082 typedef std::list<OSB_LIB::InventoryPool> Pools; 00083 00084 public: 00089 InvMgmtWidget( 00090 AdminType type, 00091 QWidget* parent, 00092 const char* name = 0, 00093 WFlags flags = 0 00094 ); 00095 00097 ~InvMgmtWidget(); 00098 private: 00100 InvMgmtWidget(const InvMgmtWidget&); 00102 InvMgmtWidget& operator=(const InvMgmtWidget&); 00103 00104 public: 00105 // documentation from base class 00106 std::string menuTitle() const; 00107 // documentation from base class 00108 QPopupMenu* menu(); 00109 // documentation from base class 00110 void clearMenuAccels(); 00111 00112 public slots: 00114 void languageChange(); 00116 void readPools(); 00118 void showPrev(); 00120 void showNext(); 00121 00122 private slots: 00124 void savePool(); 00126 void removePool(); 00128 void edited(); 00129 00130 private: 00132 void showPool(); 00133 00134 private: // OSB data 00136 Pools* pools_; 00138 PoolId curPool_; 00139 00140 private: // widgets 00142 QLabel* tlId_; 00144 LeId* leId_; 00146 QLabel* tlName_; 00148 QLineEdit* leName_; 00150 QLabel* tlDes_; 00152 QTextEdit* teDes_; 00153 00155 QFrame* linePb_; 00157 QPushButton* pbPrev_; 00159 QPushButton* pbNext_; 00161 QPushButton* pbSave_; 00163 QPushButton* pbRemove_; 00164 00166 QVBoxLayout* layout_; 00168 QHBoxLayout* loTop_; 00170 QSpacerItem* spTop_; 00172 QHBoxLayout* loPb_; 00174 QSpacerItem* spDes_; 00176 QSpacerItem* spPb_; 00177 }; // class InvMgmtWidget 00178 } // namespace OSB_GUI 00179 00180 // ************************************************************************ 00181 // inline definitions 00182 namespace OSB_GUI { 00183 } // namespace OSB_GUI 00184 #endif // #ifndef _INVMGMTWIDGET_H_