コード例 #1
0
ファイル: qgraphicsitemanimation.cpp プロジェクト: Afreeca/qt
/*!
  \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);
}
コード例 #2
0
// Write virtual function overries used to decide on static/virtual calls
void QGraphicsItemAnimation_QtDShell::__override_afterAnimationStep(double  step0, bool static_call)
{
    if (static_call) {
        QGraphicsItemAnimation::afterAnimationStep((double )step0);
    } else {
        afterAnimationStep((double )step0);
    }
}
コード例 #3
0
void sipQGraphicsItemAnimation::sipProtectVirt_afterAnimationStep(bool sipSelfWasArg,qreal a0)
{
    (sipSelfWasArg ? QGraphicsItemAnimation::afterAnimationStep(a0) : afterAnimationStep(a0));
}