10 void AnimPoint::operator= ( const AnimPoint & other )
15 void AnimPoint::operator= ( const QPointF & other )
22 bool AnimPoint::operator== ( const QPointF& other )
28 bool AnimPoint::operator== ( AnimPoint other )
30 if (rx() != other.rx() ) return false;
31 if (ry() != other.ry() ) return false;
32 if (startPos != other.startPos) return false;
33 if (destPos != other.destPos) return false;
34 if (animated != other.animated ) return false;
39 void AnimPoint::init ()
43 startPos=QPointF(0,0);
49 void AnimPoint::copy (AnimPoint other)
53 startPos=other.startPos;
54 destPos=other.destPos;
56 animated=other.animated;
58 animTicks=other.animTicks;
61 void AnimPoint::setStart(const QPointF &p)
67 QPointF AnimPoint::getStart()
73 void AnimPoint::setDest(const QPointF &p)
79 QPointF AnimPoint::getDest()
84 void AnimPoint::setTicks (const uint &t)
89 uint AnimPoint::getTicks()
94 void AnimPoint::setAnimated(bool b)
100 bool AnimPoint::isAnimated()
105 bool AnimPoint::animate()
107 if (!animated) return animated;
116 setX (startPos.x() + vector.x()*sqrt(n/animTicks) );
117 setY (startPos.y() + vector.y()*sqrt(n/animTicks) );
119 setX (startPos.x() + vector.x()*(n/animTicks) );
120 setY (startPos.y() + vector.y()*(n/animTicks) );
125 void AnimPoint::initVector()
127 vector.setX (destPos.x()-startPos.x() );
128 vector.setY (destPos.y()-startPos.y() );