29 if (ai->pixmap().isNull())
36 setStartValue(QPoint(0, 0));
37 setEndValue(QPoint(1, 1));
45 boost::posix_time::time_duration diff = fTime - iTime;
46 double totalSeconds = diff.total_seconds();
53 boost::posix_time::ptime itime = ai->
m_animationTime[0].getTimeInstant();
64 double seconds = diff.total_seconds();
67 double t = seconds / totalSeconds;
73 for(
size_t i = 1; i < size-1; ++i)
78 double seconds = diff.total_seconds();
81 double t = seconds / totalSeconds;
93 double seconds = diff.total_seconds();
96 double t = seconds / totalSeconds;
112 boost::posix_time::time_duration diff = fTime - iTime;
113 double totalSeconds = diff.total_seconds();
116 int secs = qRound(totalSeconds * trel);
117 boost::posix_time::time_duration
td = boost::posix_time::seconds(secs);
118 boost::posix_time::ptime curTime = iTime +
td;
120 if (curTime < iTime || curTime > fTime)
125 int max = (
int)count - 1;
127 while ((max - min) > 100)
129 int i = min + (max - min) / 2;
131 boost::posix_time::ptime time = tinstant.getTimeInstant();
135 else if (time > curTime)
137 else if (time < curTime)
141 for (
int i = min; i <= max; ++i)
148 else if (time > curTime)
150 if (i == 0 || i == ((
int)count - 1))
154 diff = time - curTime;
155 unsigned long long secs = abs(diff.total_seconds());
158 boost::posix_time::ptime btime = tinstant.getTimeInstant();
159 diff = btime - curTime;
160 unsigned long long bsecs = abs(diff.total_seconds());
163 boost::posix_time::ptime atime = tinstant.getTimeInstant();
164 diff = atime - curTime;
165 unsigned long long asecs = abs(diff.total_seconds());
167 if (secs < bsecs && secs < asecs)
169 else if (bsecs < asecs)
190 boost::posix_time::time_duration diff = fTime - iTime;
191 double totalSeconds = diff.total_seconds();
196 double timeSeconds = diff.total_seconds();
198 if (direction() == QAbstractAnimation::Forward)
200 if (timeSeconds / totalSeconds > trel)
207 if (timeSeconds / totalSeconds < trel)
static te::dt::TimeDuration td(20, 30, 50, 11)
This file defines a abstarct class for a Image Item.
const boost::posix_time::ptime & getTimeInstant() const
It returns the boost time instant type.
A class to represent time instant.
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.