plugincontratos.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 
00029 #include "company.h"
00030 #include "plugincontratos.h"
00031 #include "funcaux.h"
00032 #include "contratoslist.h"
00033 #include "ficha.h"
00034 
00036 
00038 myplugincont::myplugincont() {
00039     _depura("myplugincont::myplugincont", 0);
00040     _depura("END myplugincont::myplugincont", 0);
00041 }
00042 
00044 
00046 myplugincont::~myplugincont() {
00047     _depura("myplugincont::~myplugincont", 0);
00048     _depura("END myplugincont::~myplugincont", 0);
00049 }
00050 
00051 
00053 
00055 void myplugincont::elslot() {
00056     _depura("myplugincont::elslot", 0);
00057     ContratosList *vehiculoview = new ContratosList((Company *) m_conexionbase);
00058     m_bulmafact->workspace()->addWindow(vehiculoview);
00059     vehiculoview->show();
00060     _depura("END myplugincont::elslot", 0);
00061 }
00062 
00063 
00065 
00068 void myplugincont::inicializa(Bulmafact *bges) {
00069     _depura("myplugincont::inicializa", 0);
00071     m_conexionbase = bges->getcompany();
00072     m_bulmafact = bges;
00073     QAction *accion = new QAction("&Contratos", 0);
00074     accion->setStatusTip("Listado de Contratos");
00075     accion->setWhatsThis("Listado de Contratos");
00076     connect(accion, SIGNAL(activated()), this, SLOT(elslot()));
00078     bges->menuVentas->addSeparator();
00079     bges->menuVentas->addAction(accion);
00080     _depura("END myplugincont::inicializa", 0);
00081 }
00082 
00083 
00085 
00089 int entryPoint(Bulmafact *bges) {
00090     _depura("Punto de Entrada del plugin PluginContratos", 0);
00091     myplugincont *plug = new myplugincont();
00092     plug->inicializa(bges);
00093     _depura("END Punto de Entrada del plugin PluginContratos", 0);
00094     return 0;
00095 }
00096 
00097 
00099 
00103 int ClienteView_ClienteView(ClienteView *art) {
00104     _depura("ClienteView_ClienteView", 0);
00106     ContratosList *l = new ContratosList(((Company *)art->empresaBase()), art, 0, ContratosList::SelectMode);
00107     l->setObjectName(QString::fromUtf8("ccontratoslist"));
00108     art->mui_tab->addTab(l, "Contratos");
00109     l->editMode();
00110     _depura("END ClienteView_ClienteView", 0);
00111     return 0;
00112 }
00113 
00114 
00116 
00120 int Ficha_cargar(Ficha *fich) {
00121     _depura("Ficha_cargar", 0);
00122     ContratosList *l = fich->findChild<ContratosList *>("ccontratoslist");
00123     if (l) {
00124         l->mui_idcliente->setidcliente(fich->DBvalue("idcliente"));
00125         l->on_mui_actualizar_clicked();
00126         return 0;
00127     } // end if
00128     return 0;
00129 }

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