void DemoApplication::processFinished(int exitCode, QProcess::ExitStatus exitStatus) { Q_UNUSED(exitCode); Q_UNUSED(exitStatus); emit demoFinished(); QObject::disconnect(this, SIGNAL(demoStarted()), 0, 0); QObject::disconnect(this, SIGNAL(demoFinished()), 0, 0); }
void FluidLauncher::launchApplication(int index) { // NOTE: Clearing the caches will free up more memory for the demo but will cause // a delay upon returning, as items are reloaded. //pictureFlowWidget->clearCaches(); if (index == demoList.size() -1) { qApp->quit(); return; } inputTimer->stop(); QObject::connect(demoList[index], SIGNAL(demoFinished()), this, SLOT(demoFinished())); demoList[index]->launch(); }
void DemoApplication::processError(QProcess::ProcessError err) { qDebug() << "Process error: " << err; if (err == QProcess::Crashed) emit demoFinished(); }
void FluidLauncher::launchApplication(int index) { // NOTE: Clearing the caches will free up more memory for the demo but will cause // a delay upon returning, as items are reloaded. //pictureFlowWidget->clearCaches(); if ( (index==-1) )//||(index == demoList.size() -1)) { hide(); return; } #if 0 QObject::connect(demoList[index], SIGNAL(demoFinished()), this, SLOT(demoFinished())); demoList[index]->launch(); #endif if (Type == PictureFlowType) { int result = EMPTY; QString ItemText = demoList[index]->getIdPocket(); //TODO: try to implement sub level // if ItemText start with a specic tag, load the corresponding xml and display the new pictureflow. // Esc should exit if (mainwindow->objtable.contains(ItemText)) result = mainwindow->objtable.value(ItemText); if (result != EMPTY) { mainwindow->LoadPocket(result); close(); // parentWidget()->close(); } } if (Type == FileBrowserType) { // qWarning("launchApplication: %i t=%i\n",index,demoList.size()); if (index >= demoList.size()) { QMessageBox::information(mainwindow,"ERREUR",QString("%1").arg(index),QMessageBox::Ok); return; } if (demoList.at(index)->getArguments().contains("Dir")) { pictureFlowWidget->clear(); QString newpath = demoList.at(index)->getIdPocket(); // QMessageBox::information(mainwindow,"test",newpath,QMessageBox::Ok); demoList.clear(); Config[0]+="/"+newpath; populateFileBrowser(Config); } else { if (Config.at(1)=="*.pml") { mainwindow->opensession(pictureFlowWidget->getSlideCaption(index)); } if (Config.at(1)=="*.pdf") { qWarning()<<"open pdf:"<<Config.at(0)+"/"+pictureFlowWidget->getSlideCaption(index); QUrl url(Config.at(0)+"/"+pictureFlowWidget->getSlideCaption(index)); QDesktopServices::openUrl(url); } close(); } } }