pluginadocumental.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2004 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 <QToolButton>
00027 #include <QImage>
00028 #include <QLabel>
00029 #include <QPixmap>
00030 #include <QFrame>
00031 
00032 #include "pluginadocumental.h"
00033 #include "empresa.h"
00034 #include "asiento1view.h"
00035 #include "adocumental.h"
00036 
00038 #include "napuntedoc.xpm"
00039 #include "ndoc.xpm"
00040 
00041 
00043 
00046 void entryPoint(Bulmacont *bcont) {
00047     _depura("Entrada del plugin ADocumental.", 10);
00048 
00049     QPixmap *img = new QPixmap(napuntedoc);
00050     QPixmap *img1 = new QPixmap(ndoc);
00051 
00052     Empresa *emp = bcont->empresaactual();
00053     Asiento1View *intapunts = emp->intapuntsempresa();
00054 
00055     myplugin1 *pub = new myplugin1(emp);
00056     intapunts->hide();
00057 
00058     QToolButton *m_adocumental = new QToolButton(intapunts);
00059     m_adocumental->setIcon(QIcon(*img));
00060     m_adocumental->setMinimumSize(QSize(22, 22));
00061     m_adocumental->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
00062     QObject::connect(m_adocumental, SIGNAL(clicked()), pub, SLOT(boton_adjuntar()));
00063 
00064     intapunts->hboxLayout1->addWidget(m_adocumental);
00065 
00066     QToolButton *m_adocumental1 = new QToolButton(intapunts);
00067     m_adocumental1->setIcon(QIcon(*img1));
00068     m_adocumental1->setMinimumSize(QSize(22, 22));
00069     m_adocumental1->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
00070     QObject::connect(m_adocumental1, SIGNAL(clicked()), pub, SLOT(boton_nuevoasientodocumental()));
00071 
00072     intapunts->hboxLayout1->addWidget(m_adocumental1);
00073 
00075     QAction *ArchDoc = new QAction("&Archivo documental", 0);
00076     ArchDoc->setStatusTip("Archivo documental");
00077     ArchDoc->setWhatsThis("Archivo documental");
00078     QObject::connect(ArchDoc, SIGNAL(activated()), pub, SLOT(archDoc()));
00079 
00081     bcont->mui_MenuHerramientas()->addSeparator();
00082     bcont->mui_MenuHerramientas()->addAction(ArchDoc);
00083     _depura("Iniciado correctamente el plugin ADocumental.", 10);
00084 }
00085 

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