Example #1
0
/*!
  \fn void QGraphicsItemAnimation::setStep(qreal step)

  Sets the current \a step value for the animation, causing the
  transformations scheduled at this step to be performed.
*/
void QGraphicsItemAnimation::setStep(qreal x)
{
    if (x < 0.0 || x > 1.0) {
        qWarning("QGraphicsItemAnimation::setStep: invalid step = %f", x);
        return;
    }

    beforeAnimationStep(x);

    d->step = x;
    if (d->item) {
        if (!d->xPosition.isEmpty() || !d->yPosition.isEmpty())
            d->item->setPos(posAt(x));
        if (!d->rotation.isEmpty()
            || !d->verticalScale.isEmpty()
            || !d->horizontalScale.isEmpty()
            || !d->verticalShear.isEmpty()
            || !d->horizontalShear.isEmpty()
            || !d->xTranslation.isEmpty()
            || !d->yTranslation.isEmpty()) {
            d->item->setMatrix(d->startMatrix * matrixAt(x));
        }
    }

    afterAnimationStep(x);
}
void QGraphicsItemAnimation_QtDShell::__override_beforeAnimationStep(double  step0, bool static_call)
{
    if (static_call) {
        QGraphicsItemAnimation::beforeAnimationStep((double )step0);
    } else {
        beforeAnimationStep((double )step0);
    }
}
void sipQGraphicsItemAnimation::sipProtectVirt_beforeAnimationStep(bool sipSelfWasArg,qreal a0)
{
    (sipSelfWasArg ? QGraphicsItemAnimation::beforeAnimationStep(a0) : beforeAnimationStep(a0));
}