equal
deleted
inserted
replaced
82 } |
82 } |
83 |
83 |
84 void HgSpring::cancel() |
84 void HgSpring::cancel() |
85 { |
85 { |
86 if (mTimer->isActive()) |
86 if (mTimer->isActive()) |
87 mTimer->stop(); |
87 mTimer->stop(); |
|
88 |
|
89 mVelocity = QPointF(0,0); |
88 } |
90 } |
89 |
91 |
90 const QPointF& HgSpring::startPos() const |
92 const QPointF& HgSpring::startPos() const |
91 { |
93 { |
92 return mStartPos; |
94 return mStartPos; |
102 return mEndPos; |
104 return mEndPos; |
103 } |
105 } |
104 |
106 |
105 const QPointF& HgSpring::velocity() const |
107 const QPointF& HgSpring::velocity() const |
106 { |
108 { |
107 return mVelocity; |
109 return mVelocity; |
108 } |
110 } |
109 |
|
110 |
111 |
111 void HgSpring::update() |
112 void HgSpring::update() |
112 { |
113 { |
113 int deltaTime = mPrevTime.elapsed(); |
114 int deltaTime = mPrevTime.elapsed(); |
114 |
115 |