rutacomercialincview.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2004 by Tomeu Borras Riera                              *
00003  *   tborras@conetxia.com                                                  *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 
00021 #include <QWidget>
00022 #include <QObject>
00023 #include <QComboBox>
00024 #include <QToolButton>
00025 #include <QFile>
00026 #include <QTextStream>
00027 #include <QLayout>
00028 #include <QMessageBox>
00029 #include <QCloseEvent>
00030 
00031 #include "rutacomercialincview.h"
00032 #include "company.h"
00033 #include "configuracion.h"
00034 #include "busquedacliente.h"
00035 #include "busquedafecha.h"
00036 
00037 #include <fstream>
00038 
00039 #include "funcaux.h"
00040 #define coma "'"
00041 
00042 
00044 
00048 RutaComercialIncView::RutaComercialIncView ( Company *comp, QWidget *parent )
00049                 : FichaBf ( comp, parent )
00050 {
00051         _depura ( "RutaComercialIncView::RutaComercialIncView", 0 );
00052         setAttribute ( Qt::WA_DeleteOnClose );
00053         setupUi ( this );
00054         mui_rutacomercial->setEmpresaBase ( comp );
00055         mui_incidenciacomercial->setEmpresaBase ( comp );
00056         meteWindow ( windowTitle(), this );
00057         _depura ( "END RutaComercialIncView::RutaComercialIncView", 0 );
00058 }
00059 
00060 
00062 
00064 RutaComercialIncView::~RutaComercialIncView()
00065 {
00066         _depura ( "RutaComercialIncView::~RutaComercialIncView", 0 );
00067         empresaBase()->sacaWindow ( this );
00068         _depura ( "END RutaComercialIncView::~RutaComercialIncView", 0 );
00069 }
00070 
00071 
00073 
00075 void RutaComercialIncView::on_mui_borrar_clicked()
00076 {
00077         _depura ( "RutaComercialIncView::on_mui_borrar_clicked\n", 0 );
00078         if ( QMessageBox::warning ( this,
00079                                     tr ( "BulmaFact - Rutas comerciales" ),
00080                                     tr ( "Desea borrar esta ruta?" ),
00081                                     tr ( "&Si" ), tr ( "&No" ) ) == 0 )
00082         {
00083                 mui_rutacomercial->borrar();
00084                 mui_incidenciacomercial->borrar();
00085         } // end if
00086         _depura ( "END RutaComercialIncView::on_mui_borrar_clicked\n", 0 );
00087 }
00088 
00089 
00091 
00093 void RutaComercialIncView::closeEvent ( QCloseEvent * )
00094 {
00095         _depura ( "closeEvent", 0 );
00096 }
00097 
00098 
00100 
00102 void RutaComercialIncView::pintar() {
00103     _depura("RutaComercialIncView::pintar", 0);
00104     _depura("END RutaComercialIncView::pintar", 0);
00105 };
00106 
00107 
00109 
00111 void RutaComercialIncView::on_mui_guardar_clicked()
00112 {
00113         _depura ( "RutaComercialIncView::on_mui_guardar_clicked", 0 );
00114         mui_rutacomercial->guardar();
00115         mui_incidenciacomercial->guardar();
00116         _depura ( "END RutaComercialIncView::on_mui_guardar_clicked", 0 );
00117 }
00118 
00119 
00121 
00126 int RutaComercialIncView::cargar ( QString id, QString id1 )
00127 {
00128         _depura ( "RutaComercialIncView::cargar", 0 );
00129         int err = mui_rutacomercial->cargar ( id );
00130         err = mui_incidenciacomercial->cargar ( id1 );
00131         setWindowTitle ( tr ( "Accion comercial" ) + " " + mui_rutacomercial->DBvalue ( "idrutacomercial" ) + " + " + mui_incidenciacomercial->DBvalue ( "idincidenciacomercial" ) );
00132         meteWindow ( windowTitle(), this );
00133         _depura ( "END RutaComercialIncView::cargar", 0 );
00134         return err;
00135 }
00136 
00137 
00139 
00141 void RutaComercialIncView::on_mui_aceptar_clicked()
00142 {
00143         _depura("RutaComercialIncView::on_mui_aceptar_clicked", 0);
00144         on_mui_guardar_clicked();
00145         close();
00146         _depura("END RutaComercialIncView::on_mui_aceptar_clicked", 0);
00147 }
00148 

Generated on Sat Dec 15 00:01:05 2007 for BulmaGes by  doxygen 1.5.1