plugindebugbc.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 "plugindebugbc.h"
00032 #include "configuracion.h"
00033 
00035 
00037 myplugin::myplugin() {
00038     _depura("myplugin::myplugin", 0);
00039     _depura("END myplugin::myplugin", 0);
00040 }
00041 
00042 
00044 
00046 myplugin::~myplugin() {
00047     _depura("myplugin::~myplugin", 0);
00048     _depura("END myplugin::~myplugin", 0);
00049 }
00050 
00051 
00053 
00056 void myplugin::cambia(bool valor) {
00057     _depura("myplugin::cambia", 0);
00058         confpr->setValor(CONF_DEBUG, (valor?"TRUE":"FALSE"));
00059     _depura("END myplugin::cambia", 0);
00060 }
00061 
00062 
00063 
00065 
00068 void entryPoint(Bulmacont *bcont) {
00069     _depura("Entrada del plugin Corrector", 10);
00070 
00071     myplugin *corr = new myplugin();
00072 
00075     QAction *viewCorrector = new QAction("&Modo Debug", 0);
00076     viewCorrector->setCheckable(TRUE);
00077 
00078     if(confpr->valor(CONF_DEBUG) == "TRUE") {
00079         viewCorrector->setChecked(TRUE);
00080     } else {
00081         viewCorrector->setChecked(FALSE);
00082     }
00083 
00084     viewCorrector->setStatusTip("Activa/Desactiva el Modo Debug");
00085     viewCorrector->setWhatsThis("Debug.\n\nActiva/Desactiva el Modo Debug");
00086     QObject::connect(viewCorrector, SIGNAL(toggled(bool)), corr, SLOT(cambia(bool)));
00087     bcont->mui_MenuVer()->addSeparator();
00088     bcont->mui_MenuVer()->addAction(viewCorrector);
00089     _depura("Iniciado correctamente el plugin Corrector", 10);
00090 }
00091 

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