pluginvehiculosbf.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 "pluginvehiculosbf.h"
00031 #include "funcaux.h"
00032 #include "vehiculoview.h"
00033 
00034 
00036 
00038 myplugin::myplugin() {
00039     _depura("myplugin::myplugin", 0);
00040     _depura("END myplugin::myplugin", 0);
00041 }
00042 
00043 
00045 
00047 myplugin::~myplugin() {
00048     _depura("myplugin::~myplugin", 0);
00049     _depura("END myplugin::~myplugin", 0);
00050 }
00051 
00052 
00054 
00056 void myplugin::elslot() {
00057     _depura("myplugin::elslot", 0);
00058     VehiculoView *vehiculoview = new VehiculoView((Company *) m_conexionbase);
00059     m_bulmafact->workspace()->addWindow(vehiculoview);
00060     vehiculoview->show();
00061     _depura("END myplugin::elslot", 0);
00062 }
00063 
00064 
00066 
00069 void myplugin::inicializa(Bulmafact *bges) {
00070     _depura("myplugin::inicializa", 0);
00072     m_conexionbase = bges->getcompany();
00073     m_bulmafact = bges;
00074     QMenu *pPluginMenu = new QMenu("&Vehiculos");
00075     QAction *accion = new QAction("&Nuevo vehiculo", 0);
00076     accion->setStatusTip("Vehiculos");
00077     accion->setWhatsThis("Vehiculos");
00078     connect(accion, SIGNAL(activated()), this, SLOT(elslot()));
00079     pPluginMenu->addAction(accion);
00081     bges->menuBar()->addMenu(pPluginMenu);
00082     _depura("END myplugin::inicializa", 0);
00083 }
00084 
00085 
00087 
00091 int entryPoint(Bulmafact *bges) {
00092     _depura("Punto de Entrada del plugin PluginVehiculosBF", 0);
00093     myplugin *plug = new myplugin();
00094     plug->inicializa(bges);
00095     _depura("END Punto de Entrada del plugin PluginVehiculosBF", 0);
00096     return 0;
00097 }
00098 

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