Example #1
0
int Chaser::runningStepsNumber() const
{
    int ret = 0;
    {
        QMutexLocker runnerLocker(const_cast<QMutex*>(&m_runnerMutex));
        if (m_runner != NULL)
            ret = m_runner->runningStepsNumber();
    }
    return ret;
}
Example #2
0
int Chaser::computeNextStep(int currentStepIndex) const
{
    int ret = m_startStepIndex;
    {
        QMutexLocker runnerLocker(const_cast<QMutex*>(&m_runnerMutex));
        if (m_runner != NULL)
            ret = m_runner->computeNextStep(currentStepIndex);
    }
    return ret;
}
Example #3
0
void Chaser::adjustStepIntensity(qreal fraction, int stepIndex, FadeControlMode fadeControl)
{
    QMutexLocker runnerLocker(&m_runnerMutex);
    if (m_runner != NULL)
    {
        m_runner->adjustStepIntensity(fraction * getAttributeValue(Intensity), stepIndex, fadeControl);
    }
    else
    {
        m_startupAction.m_intensity = fraction * getAttributeValue(Intensity);
    }
}
Example #4
0
void Chaser::setAction(ChaserAction &action)
{
    QMutexLocker runnerLocker(&m_runnerMutex);
    if (m_runner != NULL)
    {
        m_runner->setAction(action);
    }
    else
    {
        m_startupAction.m_action = action.m_action;
        m_startupAction.m_stepIndex = action.m_stepIndex;
        m_startupAction.m_intensity = action.m_intensity;
        m_startupAction.m_fadeMode = action.m_fadeMode;
    }
}
Example #5
0
ChaserRunnerStep Chaser::currentRunningStep() const
{
    ChaserRunnerStep ret;
    ret.m_function = NULL;

    {
        QMutexLocker runnerLocker(const_cast<QMutex*>(&m_runnerMutex));
        if (m_runner != NULL)
        {
            ChaserRunnerStep *step = m_runner->currentRunningStep();
            if (step != NULL)
                ret = *step;
        }
    }
    return ret;
}
Example #6
0
void Chaser::tap()
{
    QMutexLocker runnerLocker(&m_runnerMutex);
    if (m_runner != NULL && durationMode() == Common)
        m_runner->tap();
}
Example #7
0
void Chaser::adjustIntensity(qreal fraction, int stepIndex)
{
    QMutexLocker runnerLocker(&m_runnerMutex);
    if (m_runner != NULL)
        m_runner->adjustIntensity(fraction * getAttributeValue(Intensity), stepIndex);
}
Example #8
0
void Chaser::setCurrentStep(int step, qreal intensity)
{
    QMutexLocker runnerLocker(&m_runnerMutex);
    if (m_runner != NULL)
        m_runner->setCurrentStep(step, intensity * getAttributeValue(Intensity));
}
Example #9
0
void Chaser::stopStep(int stepIndex)
{
    QMutexLocker runnerLocker(&m_runnerMutex);
    if (m_runner != NULL)
        m_runner->stopStep(stepIndex);
}
Example #10
0
void Chaser::next()
{
    QMutexLocker runnerLocker(&m_runnerMutex);
    if (m_runner != NULL)
        m_runner->next();
}
Example #11
0
void Chaser::previous()
{
    QMutexLocker runnerLocker(&m_runnerMutex);
    if (m_runner != NULL)
        m_runner->previous();
}