summaryrefslogtreecommitdiffstats
path: root/src/animations/xyanimation_p.h
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@digia.com>2012-05-25 13:47:19 +0300
committerMichal Klocek <michal.klocek@digia.com>2012-05-25 13:49:11 +0300
commit51695bb27b0ea6cae78968b5b21021ea88320527 (patch)
tree37651f9b1f6b42f000a3dd1aa8b7dd7c38fd823b /src/animations/xyanimation_p.h
parent897a83c64309456c739ecd282b297a28a123d567 (diff)
Refactors axis animation, line animations
Diffstat (limited to 'src/animations/xyanimation_p.h')
-rw-r--r--src/animations/xyanimation_p.h8
1 files changed, 5 insertions, 3 deletions
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<QPointF> &oldPoints, QVector<QPointF> &newPoints,int index);
+ void setValues(const QVector<QPointF> &oldPoints, const QVector<QPointF> &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<QPointF> m_oldPoints;
+ QVector<QPointF> m_newPoints;
+ int m_index;
bool m_dirty;
Animation m_type;
};