plugincorrector.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 <QMessageBox>
00025 #include <QStringList>
00026 #include <QWidget>
00027 #include <QIcon>
00028 #include <QApplication>
00029 #include <QObject>
00030 
00031 #include "plugincorrector.h"
00032 #include "correctorwidget.h"
00033 #include "empresa.h"
00034 
00036 
00039 void entryPoint(Bulmacont *bcont) {
00040     _depura("Entrada del plugin Corrector", 10);
00041     Empresa *emp = bcont->empresaactual();
00043     QDockWidget *doc1 = new QDockWidget("Corrector", bcont);
00044     doc1->setFeatures(QDockWidget::AllDockWidgetFeatures);
00045 
00046     doc1->setGeometry(100, 100, 100, 500);
00047     doc1->resize(330, 400);
00048     bcont->addDockWidget(Qt::RightDockWidgetArea, doc1);
00049     doc1->show();
00050 
00051     correctorwidget *corr = new correctorwidget(doc1);
00052     corr->setEmpresa(emp);
00053     corr->dock = doc1;
00054 
00055     doc1->setWidget(corr);
00056 
00059     QAction *viewCorrector = new QAction("&Corrector", 0);
00060     viewCorrector->setCheckable(TRUE);
00061     viewCorrector->setChecked(TRUE);
00062     viewCorrector->setStatusTip("Muestra/oculta el corrector");
00063     viewCorrector->setWhatsThis("Corrector.\n\nMuestra/oculta el corrector");
00064     QObject::connect(viewCorrector, SIGNAL(toggled(bool)), corr, SLOT(cambia(bool)));
00065     bcont->mui_MenuVer()->addSeparator();
00066     bcont->mui_MenuVer()->addAction(viewCorrector);
00067     _depura("Iniciado correctamente el plugin Corrector", 10);
00068 }
00069 

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