From 51695bb27b0ea6cae78968b5b21021ea88320527 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Fri, 25 May 2012 13:47:19 +0300 Subject: Refactors axis animation, line animations --- src/animations/xyanimation_p.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/animations/xyanimation_p.h') diff --git a/src/animations/xyanimation_p.h b/src/animations/xyanimation_p.h index 92d644f4..50b3478a 100644 --- a/src/animations/xyanimation_p.h +++ b/src/animations/xyanimation_p.h @@ -31,20 +31,22 @@ class XYChart; class XYAnimation : public ChartAnimation { public: - enum Animation { LineDrawAnimation, MoveDownAnimation, MoveUpAnimation }; + enum Animation { AddPointAnimation, RemovePointAnimation, ReplacePointAnimation, NewAnimation }; XYAnimation(XYChart *item); ~XYAnimation(); - void setValues(QVector &oldPoints, QVector &newPoints,int index); + void setValues(const QVector &oldPoints, const QVector &newPoints,int index); void setAnimationType(Animation type); Animation animationType() const { return m_type; }; protected: QVariant interpolated(const QVariant &start, const QVariant &end, qreal progress ) const; void updateCurrentValue (const QVariant &value ); - + void updateState( QAbstractAnimation::State newState, QAbstractAnimation::State oldState ); private: XYChart *m_item; QVector m_oldPoints; + QVector m_newPoints; + int m_index; bool m_dirty; Animation m_type; }; -- cgit v1.2.3