myplugin.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 "myplugin.h"
00022 #include "rutacomerciallist.h"
00023 #include "listzonacomercialview.h"
00024 #include "funcaux.h"
00025 
00026 
00028 
00030 mypluginbf::mypluginbf() : QObject() {
00031     _depura("mypluginbf::mypluginbf", 0);
00032     _depura("END mypluginbf::mypluginbf", 0);
00033 }
00034 
00035 
00037 
00039 mypluginbf::~mypluginbf() {
00040     _depura("mypluginbf::~mypluginbf", 0);
00041     _depura("END mypluginbf::~mypluginbf", 0);
00042 }
00043 
00044 
00046 
00048 void mypluginbf::elslot() {
00049     _depura("mypluginbf::elslot", 0);
00050     RutaComercialList *list  = new RutaComercialList((Company *)empresaBase(), NULL);
00051     empresaBase()->m_pWorkspace->addWindow(list);
00052     list->show();
00053     _depura("END mypluginbf::elslot", 0);
00054 }
00055 
00056 
00058 
00060 void mypluginbf::elslot1() {
00061     _depura("mypluginbf::elslot1", 0);
00062     ListZonaComercialView *list = new ListZonaComercialView((Company *)empresaBase(), NULL);
00063     empresaBase()->m_pWorkspace->addWindow(list);
00064     list->show();
00065     _depura("END mypluginbf::elslot1", 0);
00066 }
00067 
00068 
00070 
00073 void mypluginbf::inicializa(Bulmafact *bges) {
00074     _depura("mypluginbf::inicializa", 0);
00076     m_bges = bges;
00078     setEmpresaBase(bges->getcompany());
00080     bges->menuMaestro->addSeparator();
00082     QAction *planCuentas1 = new QAction(tr("&Zonas comerciales"), 0);
00083     planCuentas1->setStatusTip(tr("Zonas comerciales"));
00084     planCuentas1->setWhatsThis(tr("Zonas comerciales"));
00085     bges->menuMaestro->addAction(planCuentas1);
00086     connect(planCuentas1, SIGNAL(activated()), this, SLOT(elslot1()));
00088     QAction *planCuentas = new QAction(tr("&Rutas comerciales"), 0);
00089     planCuentas->setStatusTip(tr("Rutas comerciales"));
00090     planCuentas->setWhatsThis(tr("Rutas comerciales"));
00091     bges->menuMaestro->addAction(planCuentas);
00092     connect(planCuentas, SIGNAL(activated()), this, SLOT(elslot()));
00093     _depura("END mypluginbf::inicializa", 0);
00094 }
00095 

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