Qt 4.8
Functions
qdeclarativeanimation.cpp File Reference
#include "private/qdeclarativeanimation_p.h"
#include "private/qdeclarativeanimation_p_p.h"
#include "private/qdeclarativebehavior_p.h"
#include "private/qdeclarativestateoperations_p.h"
#include "private/qdeclarativecontext_p.h"
#include <qdeclarativepropertyvaluesource.h>
#include <qdeclarative.h>
#include <qdeclarativeinfo.h>
#include <qdeclarativeexpression.h>
#include <qdeclarativestringconverters_p.h>
#include <qdeclarativeglobal_p.h>
#include <qdeclarativemetatype_p.h>
#include <qdeclarativevaluetype_p.h>
#include <qdeclarativeproperty_p.h>
#include <qdeclarativeengine_p.h>
#include <qvariant.h>
#include <qcolor.h>
#include <qfile.h>
#include <QParallelAnimationGroup>
#include <QSequentialAnimationGroup>
#include <QtCore/qset.h>
#include <QtCore/qrect.h>
#include <QtCore/qpoint.h>
#include <QtCore/qsize.h>
#include <QtCore/qmath.h>
#include <private/qvariantanimation_p.h>

Go to the source code of this file.

Functions

QVariant _q_interpolateClockwiseRotation (qreal &f, qreal &t, qreal progress)
 
QVariant _q_interpolateCounterclockwiseRotation (qreal &f, qreal &t, qreal progress)
 
QVariant _q_interpolateShortestRotation (qreal &f, qreal &t, qreal progress)
 

Function Documentation

◆ _q_interpolateClockwiseRotation()

QVariant _q_interpolateClockwiseRotation ( qreal f,
qreal t,
qreal  progress 
)

Definition at line 1458 of file qdeclarativeanimation.cpp.

Referenced by QDeclarativeRotationAnimation::setDirection().

1459 {
1460  qreal newt = t;
1461  qreal diff = t-f;
1462  while(diff < 0.0){
1463  newt += 360.0;
1464  diff += 360.0;
1465  }
1466  return QVariant(f + (newt - f) * progress);
1467 }
The QVariant class acts like a union for the most common Qt data types.
Definition: qvariant.h:92
double qreal
Definition: qglobal.h:1193
static Bigint * diff(Bigint *a, Bigint *b)

◆ _q_interpolateCounterclockwiseRotation()

QVariant _q_interpolateCounterclockwiseRotation ( qreal f,
qreal t,
qreal  progress 
)

Definition at line 1469 of file qdeclarativeanimation.cpp.

Referenced by QDeclarativeRotationAnimation::setDirection().

1470 {
1471  qreal newt = t;
1472  qreal diff = t-f;
1473  while(diff > 0.0){
1474  newt -= 360.0;
1475  diff -= 360.0;
1476  }
1477  return QVariant(f + (newt - f) * progress);
1478 }
The QVariant class acts like a union for the most common Qt data types.
Definition: qvariant.h:92
double qreal
Definition: qglobal.h:1193
static Bigint * diff(Bigint *a, Bigint *b)

◆ _q_interpolateShortestRotation()

QVariant _q_interpolateShortestRotation ( qreal f,
qreal t,
qreal  progress 
)

Definition at line 1443 of file qdeclarativeanimation.cpp.

Referenced by QDeclarativeRotationAnimation::setDirection().

1444 {
1445  qreal newt = t;
1446  qreal diff = t-f;
1447  while(diff > 180.0){
1448  newt -= 360.0;
1449  diff -= 360.0;
1450  }
1451  while(diff < -180.0){
1452  newt += 360.0;
1453  diff += 360.0;
1454  }
1455  return QVariant(f + (newt - f) * progress);
1456 }
The QVariant class acts like a union for the most common Qt data types.
Definition: qvariant.h:92
double qreal
Definition: qglobal.h:1193
static Bigint * diff(Bigint *a, Bigint *b)