pluginonline.cpp

Go to the documentation of this file.
00001 #include <stdio.h>
00002 #include "pluginonline.h"
00003 #include "empresa.h"
00004 
00005 #include <q3popupmenu.h>
00006 #include <qaction.h>
00007 #include <qobject.h>
00008 #include <qmessagebox.h>
00009 
00010 
00011 myplugin:: myplugin() {}
00012 myplugin::~myplugin() {}
00013 
00014 
00015 void myplugin::elslot() {
00016    char *args[]={"http://www.iglues.org/documentacion.php","http://www.iglues.org/documentacion.php",NULL};
00017    int pid;
00018    int error;
00019 #ifndef WIN32
00020    if ((pid=fork()) < 0) {
00021        perror ("Fork failed");
00022        exit(errno);
00023    }// end if
00024    if (!pid) {
00025       error = execvp(confpr->valor(CONF_NAVEGADOR).ascii(),args);
00026    }// end if
00027 #endif
00028 }// end elslot
00029 
00030 void myplugin::soporte() {
00031    char *args[]={"http://www.iglues.org/soporte.php","http://www.iglues.org/soporte.php",NULL};
00032    int pid;
00033    int error;
00034 #ifndef WIN32
00035    if ((pid=fork()) < 0) {
00036        perror ("Fork failed");
00037        exit(errno);
00038    }// end if
00039    if (!pid) {
00040       error = execvp(confpr->valor(CONF_NAVEGADOR).ascii(),args);
00041    }// end if
00042 #endif
00043 }// end elslot
00044 
00045 
00046 void myplugin::inicializa(Bulmages01 *bges) {
00047     //El menu de empresa
00048 //    QAction *planCuentas = new QAction("Ayuda On-Line", "&Ayuda On-Line", 0, 0);
00049     QAction *planCuentas = new QAction("&Ayuda On-Line", 0);
00050     planCuentas->setStatusTip("Ayuda a traves de Internet");
00051     planCuentas->setWhatsThis("Ayuda a traves de Internet");
00052     //El menu de empresa
00053 //    QAction *eSoporte = new QAction("Soporte Profesional", "&Soporte Profesional", 0, 0);
00054     QAction *eSoporte = new QAction( "&Soporte Profesional",  0);
00055     eSoporte->setStatusTip("Encontrar empresas que dan soporte al programa");
00056     eSoporte->setWhatsThis("Encontrar empresas que dan soporte al programa");
00057     bges->pAyudaMenu()->insertSeparator();
00058     planCuentas->addTo(bges->pAyudaMenu());
00059 eSoporte->addTo(bges->pAyudaMenu());
00060     connect(planCuentas, SIGNAL(activated()), this, SLOT(elslot()));
00061     connect(eSoporte, SIGNAL(activated()), this, SLOT(soporte()));
00062 }// end inicializa
00063 
00064 
00065 void entryPoint(Bulmages01 *bges) {
00066     fprintf(stderr,"Estoy dentro del plugin\n");
00067     myplugin *plug= new myplugin( );
00068     plug->inicializa(bges);
00069 }
00070 
00071 // Q_EXPORT_PLUGIN(myplugin)
00072 
00073 

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