comercialbf.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2005 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 <stdio.h>
00022 
00023 #include <QAction>
00024 #include <QObject>
00025 #include <QMessageBox>
00026 #include <QLineEdit>
00027 #include <QTabWidget>
00028 #include <QTranslator>
00029 #include <QTextCodec>
00030 #include <QLocale>
00031 
00032 #include "company.h"
00033 #include "myplugin.h"
00034 #include "comercialbf.h"
00035 #include "comercialclienteview.h"
00036 
00037 
00039 
00043 int entryPoint(Bulmafact *bges) {
00044     _depura("Punto de Entrada del plugin ComercialBF", 0);
00046         QTranslator *traductor = new QTranslator(0);
00047         if (confpr->valor(CONF_TRADUCCION) == "locales") {
00048             traductor->load(QString("comercialbf_") + QLocale::system().name(),
00049                             confpr->valor(CONF_DIR_TRADUCCION).toAscii().constData());
00050         } else {
00051             QString archivo = "comercialbf_" + confpr->valor(CONF_TRADUCCION);
00052            traductor->load(archivo, confpr->valor(CONF_DIR_TRADUCCION).toAscii().constData());
00053         } // end if
00054         theApp->installTranslator(traductor);
00055 
00056     mypluginbf *plug = new mypluginbf();
00057     plug->inicializa(bges);
00058     _depura("END Punto de Entrada del plugin ComercialBF", 0);
00059     return 0;
00060 }
00061 
00062 
00064 
00068 int ClienteView_ClienteView_Post(ClienteView *cli) {
00069     _depura("ClienteView_ClienteView_Post",0);
00071     cli->addDBCampo("idzonacomercial", DBCampo::DBint, DBCampo::DBNothing, QApplication::translate("ClienteView_ClienteView_Post", "Zona comercial"));
00072     cli->addDBCampo("fechabasecomercialcliente", DBCampo::DBdate, DBCampo::DBNothing, QApplication::translate("ClienteView_ClienteView_Post", "Fecha base"));
00073     cli->addDBCampo("periodocomercialcliente", DBCampo::DBvarchar, DBCampo::DBNothing, QApplication::translate("ClienteView_ClienteView_Post", "Periodo"));
00074     cli->addDBCampo("comentcomercialcliente", DBCampo::DBvarchar, DBCampo::DBNothing, QApplication::translate("ClienteView_ClienteView_Post", "Comentarios para el comercial"));
00076     ComercialClienteView *l = new ComercialClienteView(cli);
00077     l->setEmpresaBase(cli->empresaBase());
00078     l->setObjectName(QString::fromUtf8("lcomercial"));
00079     cli->mui_tab->addTab(l, QApplication::translate("ClienteView_ClienteView_Post", "&Comercial"));
00080     _depura("END ClienteView_ClienteView_Post", 0);
00081     return 0;
00082 }
00083 
00084 
00086 
00090 int ClienteView_Des_ClienteView_Post(ClienteView *cli) {
00091     _depura("ClienteView_Des_ClienteView", 0);
00093     ComercialClienteView *bus = cli->findChild<ComercialClienteView *>("lcomercial");
00094     delete bus;
00095     _depura("END ClienteView_Des_ClienteView", 0);
00096     return 0;
00097 }
00098 
00099 /*
00100 int ClienteView_saveClient(ClienteView *cli) {
00101     _depura("ClienteView_saveClient", 0);
00102     ComercialClienteView *bus = cli->findChild<ComercialClienteView *>("lcomercial");
00103     cli->setDBvalue("idzonacomercial", bus->mui_zonacomercial->idzonacomercial());
00104     cli->setDBvalue("fechabasecomercialcliente", bus->mui_fechabasecomercialcliente->fecha());
00105     cli->setDBvalue("periodocomercialcliente", bus->mui_periodocomercialcliente->periodo());
00106     cli->setDBvalue("comentcomercialcliente", bus->mui_comentcomercialcliente->toPlainText());
00107 
00108     _depura("END ClienteView_saveClient", 0);
00109     return 0;
00110 }
00111 
00112 
00113 int Cliente_pintaCliente(Cliente *cli) {
00114     _depura("Cliente_pintaCliente", 0);
00115     ClienteView *clo = (ClienteView *) cli;
00116     ComercialClienteView *bus = clo->findChild<ComercialClienteView *>("lcomercial");
00117     bus->mui_zonacomercial->setidzonacomercial(clo->DBvalue("idzonacomercial"));
00118     bus->mui_fechabasecomercialcliente->setfecha(clo->DBvalue("fechabasecomercialcliente"));
00119     bus->mui_periodocomercialcliente->setperiodo(clo->DBvalue("periodocomercialcliente"));
00120     bus->mui_comentcomercialcliente->setPlainText(clo->DBvalue("comentcomercialcliente"));
00121     _depura("END Cliente_pintaCliente", 0);
00122     return 0;
00123 }
00124 */

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