00001
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifndef _DLGTO_H_
00034 #define _DLGTO_H_
00035
00036
00037
00038
00039
00040
00041
00042
00043 #include "ui/dlgtogui.h"
00044 #include "osblineedits.h"
00045
00046
00047
00048 namespace OSB_LIB {
00049 class TariffObject;
00050 }
00051
00052
00053
00054 namespace OSB_GUI {
00055
00056
00057
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 };
00105 }
00106
00107
00108
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 }
00130 #endif // #ifndef _DLGTO_H_