@@ -23,7 +23,7 void AxisAnimationItem::updateItems(QVector<qreal>& vector1) | |||
|
23 | 23 | if(vector1.count()==0) return; |
|
24 | 24 | vector0.resize(vector1.size()); |
|
25 | 25 | |
|
26 | AxisAnimator *animation = new AxisAnimator(this); | |
|
26 | AxisAnimator *animation = new AxisAnimator(this,this); | |
|
27 | 27 | animation->setDuration(duration); |
|
28 | 28 | animation->setEasingCurve(QEasingCurve::InOutBack); |
|
29 | 29 | animation->setKeyValueAt(0.0, qVariantFromValue(vector0)); |
@@ -36,7 +36,8 void AxisAnimationItem::setLabelsAngle(int angle) | |||
|
36 | 36 | AxisItem::setLabelsAngle(angle); |
|
37 | 37 | } |
|
38 | 38 | |
|
39 |
AxisAnimator::AxisAnimator(AxisItem *axis): |
|
|
39 | AxisAnimator::AxisAnimator(AxisItem *axis,QObject *parent): QVariantAnimation(parent), | |
|
40 | m_axis(axis) | |
|
40 | 41 | { |
|
41 | 42 | } |
|
42 | 43 |
@@ -28,7 +28,7 protected: | |||
|
28 | 28 | class AxisAnimator: public QVariantAnimation |
|
29 | 29 | { |
|
30 | 30 | public: |
|
31 | AxisAnimator(AxisItem *axis); | |
|
31 | AxisAnimator(AxisItem *axis,QObject *parent = 0); | |
|
32 | 32 | virtual ~AxisAnimator(); |
|
33 | 33 | protected: |
|
34 | 34 | virtual QVariant interpolated (const QVariant & from, const QVariant & to, qreal progress ) const; |
General Comments 0
You need to be logged in to leave comments.
Login now