dlgto.h

Go to the documentation of this file.
00001 // OSB library ************************************************ -*- C++ -*-
00009 /*
00010   AUTHOR(S): Stephan Broennimann (vb)
00011 
00012   RCS information
00013    $Name: OSB_060808 $
00014    $Revision: 1.17 $
00015 
00016   License
00017    OSB rating and billing library for communication networks
00018    Copyright (C) 2004, 2005, 2006  OSB systems
00019 
00020    This file may be distributed and/or modify under the terms of the
00021    GNU General Public License (GPL) as published by the Free Software
00022    Foundation which is provided in the file LICENSE.GPL included in the
00023    packaging of this file.
00024 
00025    The file is distributed in the hope that it will be useful, but WITHOUT
00026    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00027    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00028    for more details.
00029 
00030    Holders of a OSB Commercial License may use this file under the terms
00031    and conditions of this commercial license.
00032  */
00033 #ifndef _DLGTO_H_
00034 #define _DLGTO_H_
00035 
00036 // ************************************************************************
00037 // included header files
00038 // + standard includes
00039 
00040 // + libraries
00041 
00042 // + local headers
00043 #include "ui/dlgtogui.h"
00044 #include "osblineedits.h"
00045 
00046 // ************************************************************************
00047 // class declarations
00048 namespace OSB_LIB {
00049     class TariffObject;
00050 }
00051 
00052 // ************************************************************************
00053 // namespace extensions
00054 namespace OSB_GUI {
00055 
00056 // ************************************************************************
00057 // class definitions
00061     class DlgTo : private DlgToGui {
00062     public:
00064         DlgTo(
00065             const char*    caption,
00066                   QWidget* parent,
00067             const char*    name,
00068                   bool     modal = false,
00069                   WFlags   fl = 0
00070         );
00072         bool dirty() const;
00080         template<typename Id>
00081         int showTo(
00082             const Id&                    oid,
00083             const OSB_LIB::TariffObject& to
00084         );
00092         template<typename Id>
00093         int editTo(
00094             const Id&                    oid,
00095                   OSB_LIB::TariffObject* to
00096         );
00097     private:
00099         int showTo(const OSB_LIB::TariffObject& to);
00101         int editTo(OSB_LIB::TariffObject* to);
00103         void reject();
00104     };                                  // class DlgTo
00105 }                                       // namespace OSB_GUI
00106 
00107 // ************************************************************************
00108 // temlate definitions
00109 namespace OSB_GUI {
00110     template<typename Id>
00111     int DlgTo::showTo(
00112         const Id&                    oid,
00113         const OSB_LIB::TariffObject& to
00114     )
00115     {
00116         leId_->setId(oid);
00117         return showTo(to);
00118     }
00119 
00120     template<typename Id>
00121     int DlgTo::editTo(
00122         const Id&                    oid,
00123               OSB_LIB::TariffObject* to
00124     )
00125     {
00126         leId_->setId(oid);
00127         return editTo(to);
00128     }
00129 }                                       // namespace OSB_GUI
00130 #endif                                  // #ifndef _DLGTO_H_

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