tsitems.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.33 $
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 _TSITEMS_H_
00031 #define _TSITEMS_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 TariffSystem;
00047     class TsVersion;
00048 }
00049 
00050 // ************************************************************************
00051 // namespace extensions
00052 namespace OSB_GUI {
00053 
00054 // ************************************************************************
00055 // class definitions
00059     class TsItem : public ToGroupItem {
00060         typedef OSB_LIB::Id<OSB_LIB::TariffSystem> ObjId;
00061     public:
00062         TsItem(
00063                   QListViewItem*         parent,
00064             const OSB_LIB::TariffSystem& ts
00065         );
00066     private:
00067         long objId() const;
00068         void add(const OSB_LIB::TsVersion& tsVs);
00069         void populate();
00070 
00071         bool setupMenu(ToMenu& toMenu);
00072         bool commandEvent(ToMenuCmd cmd);
00073 
00074         void showObject() const;
00075         void editObject();
00076         void delObject();
00077 
00078         void newVersion();
00079         void copyVersion();
00080     private:
00081         ObjId objId_;
00082     };
00083 
00087     class TsVsItem : public ToVsItem {
00088         typedef OSB_LIB::Id2<OSB_LIB::TsVersion> VsId;
00089     public:
00090         TsVsItem(
00091                   QListViewItem*      parent,
00092             const OSB_LIB::TsVersion& tsVs
00093         );
00094     private:
00095         long vsId() const;
00096         void showObject() const;
00097         void editObject();
00098         void changeStatus();
00099         void delObject();
00100     private:
00101         VsId vsId_;
00102     };
00106     class TsList : public ToGroup {
00107     public:
00108         TsList(
00109                   QListView* parent,
00110                   int        key,
00111             const QString&   label
00112         );
00113     private:
00114         void populate();
00115         void newObject();
00116         void add(const OSB_LIB::TariffSystem& ts);
00117     };                                  // class TsList
00118 }                                       // namespace OSB_GUI
00119 #endif                                  // #ifndef _TSITEMS_H_

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