00001 // OSB library ************************************************ -*- C++ -*- 00006 /* 00007 AUTHOR(S): Stephan Broennimann (vb) 00008 00009 RCS information 00010 $Name: OSB_060808 $ 00011 $Revision: 1.34 $ 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 _SCITEMS_H_ 00031 #define _SCITEMS_H_ 00032 00033 // ************************************************************************ 00034 // included header files 00035 // + standard includes 00036 00037 // + libraries 00038 #include <osbid.h> 00039 00040 // + local headers 00041 #include "tolists.h" 00042 00043 // ************************************************************************ 00044 // class declarations 00045 namespace OSB_LIB { 00046 class ServiceClass; 00047 class ScSystem; 00048 class ScsVersion; 00049 } 00050 00051 // ************************************************************************ 00052 // namespace extensions 00053 namespace OSB_GUI { 00054 00055 // ************************************************************************ 00056 // class definitions 00057 00061 class ScItem : public ToItem { 00062 typedef OSB_LIB::Id<OSB_LIB::ServiceClass> ObjId; 00063 public: 00064 ScItem( 00065 QListViewItem* parent, 00066 const OSB_LIB::ServiceClass& sc 00067 ); 00068 private: 00069 long objId() const; 00070 void showObject() const; 00071 void editObject(); 00072 void delObject(); 00073 private: 00074 ObjId objId_; 00075 }; // class ScItem 00076 00080 class ScsItem : public ToGroupItem { 00081 typedef OSB_LIB::Id<OSB_LIB::ScSystem> ObjId; 00082 public: 00083 ScsItem( 00084 QListViewItem* parent, 00085 const OSB_LIB::ScSystem& scs 00086 ); 00087 private: 00088 long objId() const; 00089 void populate(); 00090 void newVersion(); 00091 void showObject() const; 00092 void editObject(); 00093 void delObject(); 00094 private: 00095 ObjId objId_; 00096 }; 00097 00101 class ScsVsItem : public ToVsItem { 00102 typedef OSB_LIB::Id2<OSB_LIB::ScsVersion> VsId; 00103 public: 00104 ScsVsItem( 00105 QListViewItem* parent, 00106 const OSB_LIB::ScsVersion& scsVs 00107 ); 00108 private: 00109 long vsId() const; 00110 void showObject() const; 00111 void editObject(); 00112 void changeStatus(); 00113 void delObject(); 00114 private: 00115 VsId vsId_; 00116 }; 00117 00121 class ScList : public ToGroup { 00122 public: 00123 ScList( 00124 QListViewItem* parent, 00125 int key, 00126 const QString& label 00127 ); 00128 private: 00129 void populate(); 00130 void add(const OSB_LIB::ServiceClass& sc); 00131 void newObject(); 00132 }; // class ScList 00133 00137 class ScsList : public ToGroup { 00138 public: 00139 ScsList( 00140 QListViewItem* parent, 00141 int key, 00142 const QString& label 00143 ); 00144 private: 00145 void populate(); 00146 void add(const OSB_LIB::ScSystem& scs); 00147 void newObject(); 00148 }; // class ScsList 00149 } // namespace OSB_GUI 00150 #endif // #ifndef _SCITEMS_H_