diff options
author | Titta Heikkala <titta.heikkala@theqtcompany.com> | 2015-09-11 08:50:08 +0300 |
---|---|---|
committer | Titta Heikkala <titta.heikkala@theqtcompany.com> | 2015-09-11 08:34:27 +0000 |
commit | 97642714ab1ee0484993593ad2de67a2053a9a57 (patch) | |
tree | 0043ba93314b41a2d4785c1afe0ceef258b15969 /src/charts/animations/baranimation.cpp | |
parent | 6ae307b421c60b7d0e4dde871451f670479b072b (diff) |
Added possibility to set duration and easing curve for chart animation
Changed the animation API so that it's possible to change the duration
and easing curve of the chart animation.
Change-Id: I2ab3e0664a7f30bc2bb7085daa1d97181edb90ba
Task-number: QTRD-3496
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
Diffstat (limited to 'src/charts/animations/baranimation.cpp')
-rw-r--r-- | src/charts/animations/baranimation.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/charts/animations/baranimation.cpp b/src/charts/animations/baranimation.cpp index cd5764c6..a49210ce 100644 --- a/src/charts/animations/baranimation.cpp +++ b/src/charts/animations/baranimation.cpp @@ -23,12 +23,12 @@ Q_DECLARE_METATYPE(QVector<QRectF>) QT_CHARTS_BEGIN_NAMESPACE -BarAnimation::BarAnimation(AbstractBarChartItem *item) +BarAnimation::BarAnimation(AbstractBarChartItem *item, int duration, QEasingCurve &curve) : ChartAnimation(item), m_item(item) { - setDuration(ChartAnimationDuration); - setEasingCurve(QEasingCurve::OutQuart); + setDuration(duration); + setEasingCurve(curve); } BarAnimation::~BarAnimation() |