5 : QPropertyAnimation(target, propertyName, parent)
17 if(m_temporalAnimationExtent != period)
33 boost::posix_time::ptime iTime = m_temporalAnimationExtent.getInitialTimeInstant().getTimeInstant();
34 boost::posix_time::ptime fTime = m_temporalAnimationExtent.getFinalTimeInstant().getTimeInstant();
35 boost::posix_time::time_duration diff = fTime - iTime;
36 double totalSeconds = diff.total_seconds();
43 boost::posix_time::ptime itime = ai->
m_animationTime[0].getTimeInstant();
44 boost::posix_time::ptime ftime = ai->
m_animationTime[(int)size-1].getTimeInstant();
54 double seconds = diff.total_seconds();
57 double t = seconds / totalSeconds;
63 for(
size_t i = 1; i < size-1; ++i)
68 double seconds = diff.total_seconds();
71 double t = seconds / totalSeconds;
83 double seconds = diff.total_seconds();
86 double t = seconds / totalSeconds;
101 boost::posix_time::ptime aiTime = m_temporalExtent.getInitialTimeInstant().getTimeInstant();
102 boost::posix_time::ptime afTime = m_temporalExtent.getFinalTimeInstant().getTimeInstant();
105 boost::posix_time::ptime iTime = m_temporalAnimationExtent.getInitialTimeInstant().getTimeInstant();
106 boost::posix_time::ptime fTime = m_temporalAnimationExtent.getFinalTimeInstant().getTimeInstant();
107 boost::posix_time::time_duration diff = fTime - iTime;
108 double totalSeconds = diff.total_seconds();
110 diff = aiTime - iTime;
111 double aiSeconds = diff.total_seconds();
112 double itrel = aiSeconds / totalSeconds;
116 diff = afTime - iTime;
117 double afSeconds = diff.total_seconds();
118 double ftrel = afSeconds / totalSeconds;
123 if (direction() == QAbstractAnimation::Forward)
125 for (i = 0; i < count; ++i)
130 double seconds = diff.total_seconds();
133 double t = seconds / totalSeconds;
141 for (i = (
int)count-1; i >= 0; --i)
146 double seconds = diff.total_seconds();
149 double t = seconds / totalSeconds;
const boost::posix_time::ptime & getTimeInstant() const
It returns the boost time instant type.
A class to represent time instant.
This file defines a class for a Animation Item.
TimeInstant getFinalTimeInstant() const
It gets the final time instant.
TimeInstant getInitialTimeInstant() const
It gets the initial time instant.
A class to represent time period.
This file defines a class for a Trajectory Animation.