Esempio n. 1
0
void EasingGraph::setEasingExtremes(const QString &newExtremes)
{
    if (m_easingExtremes != newExtremes) {
        m_easingExtremes = newExtremes;
        if (easingShape()!=QLatin1String("Linear"))
            setEasingName(newExtremes+easingShape());
    }
}
Esempio n. 2
0
void EasingGraph::setAmplitude(qreal newAmplitude)
{
    if ((amplitude() != newAmplitude) && ((easingShape()=="Bounce") ||(easingShape()=="Elastic"))) {
        m_curveFunction.setAmplitude(newAmplitude);
        emit amplitudeChanged();
        update();
    }
}
Esempio n. 3
0
void EasingGraph::setPeriod(qreal newPeriod)
{
    if ((period() != newPeriod) && (easingShape()==QLatin1String("Elastic"))) {
        m_curveFunction.setPeriod(newPeriod);
        emit periodChanged();
        update();
    }
}
Esempio n. 4
0
void EasingGraph::setOvershoot(qreal newOvershoot)
{
    if ((overshoot() != newOvershoot) && (easingShape()==QLatin1String("Back"))) {
        m_curveFunction.setOvershoot(newOvershoot);
        emit overshootChanged();
        update();
    }
}
Esempio n. 5
0
void EasingGraph::setEasingShape(const QString &newShape)
{
    if (easingShape() != newShape) {
        if (newShape==QLatin1String("Linear"))
            setEasingName(newShape);
        else
            setEasingName(m_easingExtremes+newShape);
    }
}