tcsutils.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.8 $
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 _TCSUTILS_H_
00031 #define _TCSUTILS_H_
00032 
00033 // ************************************************************************
00034 // included header files
00035 // + standard includes
00036 #include <memory>
00037 
00038 // + libraries
00039 #include <osbid.h>
00040 #include <tariffclass.h>
00041 
00042 // + local headers
00043 #include "osbcombos.h"
00044 #include "tautils.h"
00045 
00046 // ************************************************************************
00047 // class declarations
00048 namespace OSB_LIB {
00049     class TcSystem;
00050     class TcsVersion;
00051 }
00052 
00053 namespace OSB_GUI {
00054     class DlgTcsVs;
00055 }
00056 
00057 // ************************************************************************
00058 // namespace extensions
00059 namespace OSB_GUI {
00060 
00061 // ************************************************************************
00062 // forward declarations
00063 
00064 // ************************************************************************
00065 // type definitions
00066 
00067 // ************************************************************************
00068 // class definitions
00073     class TcsVsStatusProxy : public ToCfgTsStatusProxy {
00074     public:
00080         explicit TcsVsStatusProxy(
00081             std::auto_ptr<OSB_LIB::TcsVersion> tcsVs
00082         );
00083     private:
00085         TcsVsStatusProxy(const TcsVsStatusProxy&);
00087         TcsVsStatusProxy& operator=(const TcsVsStatusProxy&);
00088     public:
00090         OSB_LIB::ToCfgTsBase& toCfgTs();
00095         void setStatus(
00096             OSB_LIB::CfgStatus  newStatus,
00097             OSB_LIB::OsbErrors& errors
00098         );
00099         // documentation from base class
00100         bool setReleaseTs(
00101             const OSB_LIB::DateTime&  ts,
00102                   OSB_LIB::OsbErrors& errors
00103         );
00104     private:
00106         std::auto_ptr<OSB_LIB::TcsVersion> tcsVs_;
00107     };                                  // class TcsVsStatusProxy
00108 
00114     typedef ValueCombo< OSB_LIB::Id<OSB_LIB::TcSystem> > TcsComboBase;
00115 
00119     class CmbTcSystem : public TcsComboBase {
00120     public:
00122         explicit CmbTcSystem(
00123                   QWidget* parent,
00124             const char*    name = "cmpDistTcs_"
00125         );
00131         void populate(
00132             OSB_LIB::TcSystem::TcsType type,
00133             bool                       addEmpty = false
00134         );
00135     };                                  // class CmbTcSystem
00136 
00138     typedef ValueCombo< OSB_LIB::Id2<OSB_LIB::TcsVersion> > CmbTcsVsBase;
00139 
00143     class CmbTcsVersion : public CmbTcsVsBase {
00144     public:
00146         explicit CmbTcsVersion(
00147                   QWidget* parent,
00148             const char*    name = "cmbTs_"
00149         );
00150     public:
00159         void populate(
00160             const OSB_LIB::Id<OSB_LIB::TcSystem>& tcsId
00161         );
00162     };
00163 
00164 // ************************************************************************
00165 // free functions
00175     std::auto_ptr<DlgTcsVs> getDialog(
00176         const OSB_LIB::TcsVersion& tcsVs,
00177               QWidget*             parent
00178     );
00179 }                                       // namespace OSB_GUI
00180 
00181 // ************************************************************************
00182 // inline definitions
00183 namespace OSB_GUI {
00184 }                                       // namespace OSB_GUI
00185 #endif                                  // #ifndef _TCSUTILS_H_

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