Added dialog for HTML export. Grouping in Switchboard shortcuts
4 #include <qmessagebox.h>
13 xsltprocessor="xsltproc";
15 dia=new ShowTextDialog;
18 XSLTProc::~XSLTProc ()
23 void XSLTProc::addStringParam (const QString & k, const QString &v)
25 stringParamKey.append (k);
26 stringParamVal.append (v);
29 void XSLTProc::setOutputFile (const QString &s)
34 void XSLTProc::setXSLFile(const QString &s)
39 void XSLTProc::setInputFile (const QString &s)
44 void XSLTProc::addOutput (const QString &s)
49 void XSLTProc::process()
53 Process *xsltProc=new Process ();
55 QStringList::Iterator itk;
56 QStringList::Iterator itv=stringParamVal.begin();
58 for ( itk = stringParamKey.begin(); itk != stringParamKey.end(); ++itk )
60 args << "--stringparam";
70 QString com=xsltprocessor+" "+args.join(" ");
71 if (debug) cout <<"xsltproc executing:\n"<<qPrintable(com)<<endl;
72 dia.append ("vym is executing: \n" + com );
73 xsltProc->start(xsltprocessor,args);
74 if (!xsltProc->waitForStarted() )
76 QMessageBox::critical( 0, QObject::tr( "Critical Error" ),
77 QObject::tr("Could not start %1").arg(xsltprocessor) );
80 if (!xsltProc->waitForFinished())
82 QMessageBox::critical( 0, QObject::tr( "Critical Error" ),
83 QObject::tr("%1 didn't exit normally").arg(xsltprocessor) +
84 xsltProc->getErrout() );
85 if (xsltProc->exitStatus()>0) showOutput=true;
90 dia.append (xsltProc->getErrout());
91 dia.append (xsltProc->getStdout());
93 if (showOutput) dia.exec();