tpitems.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.42 $
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 _TPITEMS_H_
00031 #define _TPITEMS_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 DayClass;
00047     class SpecialDate;
00048     class TariffPeriod;
00049     class TpVersion;
00050     class TpSystem;
00051     class TpsVersion;
00052 }
00053 
00054 // ************************************************************************
00055 // namespace extensions
00056 namespace OSB_GUI {
00057 
00058 // ************************************************************************
00059 // class definitions
00063     class DcItem : public ToCfgItem {
00064         typedef OSB_LIB::Id<OSB_LIB::DayClass> ObjId;
00065     public:
00066         DcItem(
00067                   QListViewItem*     parent,
00068             const OSB_LIB::DayClass& dc
00069         );
00070     private:
00071         using ToCfgItem::set;
00072         void set(const OSB_LIB::DayClass& dc);
00073     private:                            // virtuals
00074         long objId() const;
00075         void showObject() const;
00076         void editObject();
00077         void delObject();
00078         void changeStatus();
00079     private:
00080         ObjId objId_;
00081     };                                  // class DcItem
00082 
00086     class TpItem : public ToItem
00087     {
00088         typedef OSB_LIB::Id<OSB_LIB::TariffPeriod> ObjId;
00089     public:
00090         TpItem(
00091                    QListViewItem*         parent,
00092              const OSB_LIB::TariffPeriod& tp
00093         );
00094     private:
00095         long objId() const;
00096         void showObject() const;
00097         void editObject();
00098         void delObject();
00099     private:
00100         ObjId objId_;
00101     };                                  // class TpItem
00102 
00106     class TpsItem : public ToGroupItem
00107     {
00108         typedef OSB_LIB::Id<OSB_LIB::TpSystem> ObjId;
00109     public:
00110         TpsItem(
00111                    QListViewItem*     parent,
00112              const OSB_LIB::TpSystem& tps
00113         );
00114     private:
00115         long objId() const;
00116         void add(const OSB_LIB::TpsVersion& tpsVs);
00117         void populate();
00118         void newVersion();
00119         void showObject() const;
00120         void editObject();
00121         void delObject();
00122     private:
00123         ObjId objId_;
00124     };                                  // class TpsItem
00125 
00129     class TpsVsItem : public ToVsItem {
00130         typedef OSB_LIB::Id2<OSB_LIB::TpsVersion> VsId;
00131     public:
00132         TpsVsItem(
00133                   QListViewItem*       parent,
00134             const OSB_LIB::TpsVersion& tpsVs
00135         );
00136     private:
00137         long vsId() const;
00138         void showObject() const;
00139         void editObject();
00140         void changeStatus();
00141         void delObject();
00142     private:
00143         VsId vsId_;
00144     };                                  // class TpsVsItem
00145 
00149     class DcList : public ToGroup {
00150     public:
00151         DcList(
00152                   QListViewItem* parent,
00153                   int            key,
00154             const QString&       label
00155         );
00156     private:
00157         void populate();
00158         void newObject();
00159         void add(const OSB_LIB::DayClass& dc);
00160     };                                  // class DcList
00161 
00165     class TpList : public ToGroup {
00166     public:
00167         TpList(
00168                   QListViewItem* parent,
00169                   int            key,
00170             const QString&       label
00171         );
00172     private:
00173         void populate();
00174         void newObject();
00175         void add(const OSB_LIB::TariffPeriod& tp);
00176     };                                  // class TpList
00177 
00181     class TpsList : public ToGroup {
00182     public:
00183         TpsList(
00184                   QListViewItem* parent,
00185                   int            key,
00186             const QString&       label
00187         );
00188     private:
00189         void add(const OSB_LIB::TpSystem& tps);
00190         void populate();
00191         void newObject();
00192     };                                  // class TpsList
00193 }                                       // namespace OSB_GUI
00194 #endif                                  // #ifndef _TPITEMS_H_

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