pluginproyectos.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2005 by Tomeu Borras Riera                              *
00003  *   tborras@conetxia.com                                                  *
00004  *   Copyright (C) 2006 by Fco. Javier M. C.                               *
00005  *   fcojavmc@todo-redes.com                                               *
00006  *                                                                         *
00007  *   This program is free software; you can redistribute it and/or modify  *
00008  *   it under the terms of the GNU General Public License as published by  *
00009  *   the Free Software Foundation; either version 2 of the License, or     *
00010  *   (at your option) any later version.                                   *
00011  *                                                                         *
00012  *   This program is distributed in the hope that it will be useful,       *
00013  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00014  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00015  *   GNU General Public License for more details.                          *
00016  *                                                                         *
00017  *   You should have received a copy of the GNU General Public License     *
00018  *   along with this program; if not, write to the                         *
00019  *   Free Software Foundation, Inc.,                                       *
00020  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00021  ***************************************************************************/
00022 #include <QToolButton>
00023 
00024 #include "pluginproyectos.h"
00025 #include "tiptrab.h"
00026 #include "listado.h"
00027 #include "listproyectosview.h"
00028 
00029 
00030 
00032 
00034 mytiptrab::mytiptrab() {
00035     _depura("mytiptrab::mytiptrab", 0);
00036     _depura("END mytiptrab::mytiptrab", 0);
00037 }
00038 
00039 
00041 
00043 mytiptrab::~mytiptrab() {
00044     _depura("mytiptrab::~mytiptrab", 0);
00045     _depura("END mytiptrab::~mytiptrab", 0);
00046 }
00047 
00048 
00050 
00052 void mytiptrab::elslot() {
00053     _depura("mytiptrab::elslot", 0);
00055     ListProyectosView *l = new ListProyectosView(m_bulmacont->empresaactual(), 0, 0, Listado::EditMode);
00056     l->setObjectName(QString::fromUtf8("mui_proyectos"));
00057     m_bulmacont->workspace()->addWindow(l);
00058     l->show();
00059     _depura("END mytiptrab::elslot", 0);
00060 }
00061 
00062 
00064 
00067 void mytiptrab::inicializa(Bulmacont *bges) {
00069     m_bulmacont = bges;
00070     QAction *accion = new QAction("&Proyectos", 0);
00071     accion->setStatusTip("Proyectos");
00072     accion->setWhatsThis("Proyectos");
00073     connect(accion, SIGNAL(activated()), this, SLOT(elslot()));
00075     bges->menuMaestro->insertAction(bges->actionPaises, accion);
00076 }
00077 
00078 
00080 
00084 int entryPoint(Bulmacont *bges) {
00085     _depura("Estoy dentro del plugin de proyectos", 0);
00086     mytiptrab *plug = new mytiptrab();
00087     plug->inicializa(bges);
00088     return 0;
00089 }
00090 
00092 
00096 int ccosteview_ccosteview(ccosteview *ccoste) {
00097     _depura("ccosteview_ccosteview", 0);
00098 
00100     ListProyectosView *l = new ListProyectosView(ccoste->empresaBase(),ccoste, 0, Listado::SelectMode);
00101     l->setObjectName(QString::fromUtf8("mui_proyectos"));
00102     l->mui_actualizar->setDisabled(TRUE);
00103     ccoste->tabWidget->addTab(l, "Proyectos Asociados");
00104     return 0;
00105 }
00106 
00107 
00109 
00113 int Ficha_cargar(Ficha *ficha) {
00114     ListProyectosView *l = ficha->findChild<ListProyectosView *>("mui_proyectos");
00115     if (l)
00116         l->mui_listado->cargar("SELECT * FROM presupuestoc WHERE idc_coste = " + ficha->DBvalue("idc_coste"));
00117     return 0;
00118 }
00119 

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