tfitems.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.24 $
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 _TFITEMS_H_
00031 #define _TFITEMS_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 Tariff;
00047     class TfVersion;
00048     class RatingFn;
00049 }
00050 
00051 // ************************************************************************
00052 // namespace extensions
00053 namespace OSB_GUI {
00054 
00055 // ************************************************************************
00056 // class definitions
00060     class TfItem : public ToGroupItem {
00061         typedef OSB_LIB::Id<OSB_LIB::Tariff> ObjId;
00062     public:
00063         TfItem(
00064                   QListViewItem*   parent,
00065             const OSB_LIB::Tariff& tf
00066         );
00067     private:
00068         long objId() const;
00069         void add(const OSB_LIB::TfVersion& tfVs);
00070         void populate();
00071         void newVersion();
00072         void showObject() const;
00073         void editObject();
00074         void delObject();
00075     private:
00076         ObjId objId_;
00077     };                                  // class TfItem
00078 
00082     class TfVsItem : public ToVsItem {
00083         typedef OSB_LIB::Id2<OSB_LIB::TfVersion> VsId;
00084     public:
00085         TfVsItem(
00086                   QListViewItem*      parent,
00087             const OSB_LIB::TfVersion& tfVs
00088         );
00089     private:
00090         long vsId() const;
00091         void showObject() const;
00092         void editObject();
00093         void changeStatus();
00094         void delObject();
00095     private:
00096         VsId vsId_;
00097     };                                  // class TfVsItem
00098 
00102     class RfItem : public ToCfgItem {
00103         typedef OSB_LIB::Id<OSB_LIB::RatingFn> ObjId;
00104     public:
00105         RfItem(
00106                   QListViewItem*     parent,
00107             const OSB_LIB::RatingFn& rf
00108         );
00109     private:
00110         long objId() const;
00111         void showObject() const;
00112         void editObject();
00113         void delObject();
00114         void changeStatus();
00115     private:
00116         ObjId objId_;
00117     };                                  // class RfItem
00118 
00122     class TfList : public ToGroup {
00123     public:
00124         TfList(
00125                   QListViewItem* parent,
00126                   int            key,
00127             const QString&       label
00128         );
00129     private:
00130         void add(const OSB_LIB::Tariff& tf);
00131         void populate();
00132         void newObject();
00133     };                                  // class TfList
00134 
00138     class RfList : public ToGroup {
00139     public:
00140         RfList(
00141                   QListViewItem* parent,
00142                   int            key,
00143             const QString&       label
00144         );
00145     private:
00146         void add(const OSB_LIB::RatingFn& rf);
00147         void populate();
00148         void newObject();
00149     };                                  // class RfList
00150 }                                       // namespace OSB_GUI
00151 #endif                                  // #ifndef _TFITEMS_H_

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