undo/redo for delete BranchObj. Added calling commands in testmenu
4 #include <qmessagebox.h>
11 xsltprocessor="xsltproc";
13 dia=new ShowTextDialog;
16 XSLTProc::~XSLTProc ()
21 void XSLTProc::addStringParam (const QString & k, const QString &v)
23 stringParamKey.append (k);
24 stringParamVal.append (v);
27 void XSLTProc::setOutputFile (const QString &s)
32 void XSLTProc::setXSLFile(const QString &s)
37 void XSLTProc::setInputFile (const QString &s)
42 void XSLTProc::addOutput (const QString &s)
47 void XSLTProc::process()
50 Process *xsltProc=new Process ();
51 xsltProc->clearArguments();
52 xsltProc->addArgument (xsltprocessor);
54 QStringList::Iterator itk;
55 QStringList::Iterator itv=stringParamVal.begin();
57 for ( itk = stringParamKey.begin(); itk != stringParamKey.end(); ++itk )
59 xsltProc->addArgument ("--stringparam");
60 xsltProc->addArgument (*itk);
61 xsltProc->addArgument (*itv);
65 xsltProc->addArgument ("--output");
66 xsltProc->addArgument (outputFile);
67 xsltProc->addArgument (xslFile);
68 xsltProc->addArgument (inputFile);
69 dia.append ("vym is executing: \n" + xsltProc->arguments().join(" ") );
70 if (!xsltProc->start() )
72 QMessageBox::critical( 0, QObject::tr( "Critical Error" ),
73 QObject::tr("Could not start %1").arg(xsltprocessor) );
76 xsltProc->waitFinished();
77 if (!xsltProc->normalExit() )
78 QMessageBox::critical( 0, QObject::tr( "Critical Error" ),
79 QObject::tr("%1 didn't exit normally").arg(xsltprocessor) +
80 xsltProc->getErrout() );
82 if (xsltProc->exitStatus()>0) showOutput=true;
86 dia.append (xsltProc->getErrout());
87 dia.append (xsltProc->getStdout());
89 if (showOutput) dia.exec();