Beispiel #1
0
ScriptExecuter::ScriptExecuter(QObject *parent) :
    Executer(parent),
	mScript(new ActionTools::Script(actionFactory(), this)),
	mExecuter(new LibExecuter::Executer(this))
{
	connect(mExecuter, SIGNAL(executionStopped()), this, SLOT(executionStopped()));
	connect(mExecuter, SIGNAL(scriptError(int,QString,QString)), this, SLOT(scriptError(int,QString,QString)));
}
/**
 * The current selection has changed
 * @param index The index of the new selection
 */
void MultiTabScriptInterpreter::tabSelectionChanged(int index)
{
  m_current->disconnect(SIGNAL(executionStarted()));
  m_current->disconnect(SIGNAL(executionStopped()));
  if( count() > 0 )
  {
    m_current = interpreterAt(index);
    connect(m_current, SIGNAL(executionStarted()), this, SLOT(sendScriptExecutingSignal()));
    connect(m_current, SIGNAL(executionStopped()), this, SLOT(sendScriptStoppedSignal()));
    emit executionStateChanged(m_current->isExecuting());
    setFocusProxy(m_current);
    m_current->setFocus();
  }
  else
  {
    m_current = m_nullScript;
  }
}
void OSSIAConstraintElement::stop()
{
    m_ossia_constraint->stop();
    for(auto& process : m_processes)
    {
        process.second.element->stop();
    }

    m_iscore_constraint.reset();
    executionStopped();
}
Beispiel #4
0
void ConstraintElement::stop()
{
    m_ossia_constraint->stop();
    m_ossia_constraint->getEndEvent()->getState()->launch();

    for(auto& process : m_processes)
    {
        process.second.element->stop();
    }
    m_iscore_constraint.reset();

    executionStopped();
}
Beispiel #5
0
	void Executer::stopExecution()
	{
        if(!mExecutionStarted)
			return;
		
		mScriptAgent->pause(false);
		mScriptAgent->stopExecution(false);
		mScriptEngineDebugger.action(QScriptEngineDebugger::ContinueAction)->trigger();
		
		mExecutionStarted = false;
		mExecutionStatus = Stopped;

        if(mScriptEngine)
            mScriptEngine->abortEvaluation();

		mExecutionTimer.stop();

		if(mCurrentActionIndex >= 0 && mCurrentActionIndex < mScript->actionCount())
		{
			currentActionInstance()->disconnect();
			if(!mExecutionEnded)
				currentActionInstance()->stopExecution();
		}

		for(int actionIndex = 0; actionIndex < mScript->actionCount(); ++actionIndex)
			mScript->actionAt(actionIndex)->stopLongTermExecution();

		mScriptEngineDebugger.detach();
		
        if(mScriptAgent)
        {
            mScriptAgent->deleteLater();
            mScriptAgent = 0;
        }
        if(mScriptEngine)
        {
            mScriptEngine->deleteLater();
            mScriptEngine = 0;
        }

		delete mProgressDialog;
		mProgressDialog = 0;
		mDebuggerWindow->hide();
		mExecutionWindow->hide();
		mConsoleWidget->hide();

		emit executionStopped();
	}