##// END OF EJS Templates
Added license text to mapper classes
Added license text to mapper classes

File last commit:

r1241:51695bb27b0e
r1355:785353bddfc1
Show More
chartanimator.cpp
112 lines | 3.3 KiB | text/x-c | CppLexer
Jani Honkonen
Add license headers
r794 /****************************************************************************
**
** Copyright (C) 2012 Digia Plc
** All rights reserved.
** For any questions to Digia, please use contact form at http://qt.digia.com
**
** This file is part of the Qt Commercial Charts Add-on.
**
** $QT_BEGIN_LICENSE$
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
** contact form at http://qt.digia.com
** $QT_END_LICENSE$
**
****************************************************************************/
Michal Klocek
Animation refactor...
r530 #include "chartanimator_p.h"
#include "axisanimation_p.h"
#include "xyanimation_p.h"
Michal Klocek
Improves spline interpolation...
r622 #include "splineanimation_p.h"
Michal Klocek
Refactor xychartitem -> xychart
r1218 #include "xychart_p.h"
Jani Honkonen
Add animations to pie. Works but has some visual issues when adding slices.
r618 #include "pieanimation_p.h"
sauimone
Animation framework for barchart.
r671 #include "baranimation_p.h"
#include "barchartitem_p.h"
Michal Klocek
Adds area chart animations...
r560 #include "areachartitem_p.h"
Michal Klocek
Improves spline interpolation...
r622 #include "splinechartitem_p.h"
#include "scatterchartitem_p.h"
Michal Klocek
Refactors axis animation, line animations
r1241 #include "chartaxis_p.h"
Michal Klocek
Animation refactor...
r530 #include <QTimer>
Q_DECLARE_METATYPE(QVector<QPointF>)
Q_DECLARE_METATYPE(QVector<qreal>)
sauimone
barchart animation mechanics working. still some todo
r681 Q_DECLARE_METATYPE(QVector<QRectF>)
Michal Klocek
Animation refactor...
r530
QTCOMMERCIALCHART_BEGIN_NAMESPACE
Michal Klocek
Refactors axis animation, line animations
r1241 ChartAnimator::ChartAnimator(QObject *parent):QObject(parent)
Michal Klocek
Animation refactor...
r530 {
}
ChartAnimator::~ChartAnimator()
{
}
Marek Rosa
Animation folder formating: white spaces, brackets, etc fixed
r738 void ChartAnimator::addAnimation(PieChartItem *item)
Jani Honkonen
Add animations to pie. Works but has some visual issues when adding slices.
r618 {
Marek Rosa
Animation folder formating: white spaces, brackets, etc fixed
r738 ChartAnimation *animation = m_animations.value(item);
Jani Honkonen
Add animations to pie. Works but has some visual issues when adding slices.
r618
Marek Rosa
Animation folder formating: white spaces, brackets, etc fixed
r738 if (!animation) {
Jani Honkonen
Add animations to pie. Works but has some visual issues when adding slices.
r618 animation = new PieAnimation(item);
Marek Rosa
Animation folder formating: white spaces, brackets, etc fixed
r738 m_animations.insert(item, animation);
Jani Honkonen
Add animations to pie. Works but has some visual issues when adding slices.
r618 }
item->setAnimator(this);
}
Marek Rosa
Animation folder formating: white spaces, brackets, etc fixed
r738 void ChartAnimator::addAnimation(BarChartItem *item)
sauimone
Animation framework for barchart.
r671 {
Marek Rosa
Animation folder formating: white spaces, brackets, etc fixed
r738 ChartAnimation *animation = m_animations.value(item);
sauimone
Animation framework for barchart.
r671
Marek Rosa
Animation folder formating: white spaces, brackets, etc fixed
r738 if (!animation) {
sauimone
Animation framework for barchart.
r671 animation = new BarAnimation(item);
Marek Rosa
Animation folder formating: white spaces, brackets, etc fixed
r738 m_animations.insert(item, animation);
sauimone
Animation framework for barchart.
r671 }
item->setAnimator(this);
}
Marek Rosa
Animation folder formating: white spaces, brackets, etc fixed
r738 void ChartAnimator::removeAnimation(Chart *item)
Michal Klocek
Animation refactor...
r530 {
item->setAnimator(0);
m_animations.remove(item);
}
Jani Honkonen
Refactor graphical side of pie to simplify the implementation.
r1074 void ChartAnimator::addAnimation(PieChartItem *item, PieSliceItem *sliceItem, const PieSliceData &sliceData, bool startupAnimation)
Jani Honkonen
Add animations to pie. Works but has some visual issues when adding slices.
r618 {
Marek Rosa
Animation folder formating: white spaces, brackets, etc fixed
r738 PieAnimation *animation = static_cast<PieAnimation *>(m_animations.value(item));
Jani Honkonen
Add animations to pie. Works but has some visual issues when adding slices.
r618 Q_ASSERT(animation);
Jani Honkonen
Refactor graphical side of pie to simplify the implementation.
r1074 animation->addSlice(sliceItem, sliceData, startupAnimation);
Jani Honkonen
Refactoring pie series and animations.
r621 }
Jani Honkonen
Refactor piechart to avoid using invalid QPieSlice pointers....
r1053 void ChartAnimator::removeAnimation(PieChartItem *item, PieSliceItem *sliceItem)
Jani Honkonen
Refactoring pie series and animations.
r621 {
Marek Rosa
Animation folder formating: white spaces, brackets, etc fixed
r738 PieAnimation *animation = static_cast<PieAnimation *>(m_animations.value(item));
Jani Honkonen
Refactoring pie series and animations.
r621 Q_ASSERT(animation);
Jani Honkonen
Refactor piechart to avoid using invalid QPieSlice pointers....
r1053 animation->removeSlice(sliceItem);
Jani Honkonen
Refactoring pie series and animations.
r621 }
Jani Honkonen
Refactor graphical side of pie to simplify the implementation.
r1074 void ChartAnimator::updateAnimation(PieChartItem *item, PieSliceItem *sliceItem, const PieSliceData &sliceData)
Jani Honkonen
Add animations to pie. Works but has some visual issues when adding slices.
r618 {
Marek Rosa
Animation folder formating: white spaces, brackets, etc fixed
r738 PieAnimation *animation = static_cast<PieAnimation *>(m_animations.value(item));
Jani Honkonen
Add animations to pie. Works but has some visual issues when adding slices.
r618 Q_ASSERT(animation);
Jani Honkonen
Refactor piechart to avoid using invalid QPieSlice pointers....
r1053 animation->updateValue(sliceItem, sliceData);
Jani Honkonen
Add animations to pie. Works but has some visual issues when adding slices.
r618 }
Marek Rosa
Animation folder formating: white spaces, brackets, etc fixed
r738 void ChartAnimator::updateLayout(BarChartItem *item, const QVector<QRectF> &oldLayout, const QVector<QRectF> &newLayout)
sauimone
Animation framework for barchart.
r671 {
Marek Rosa
Animation folder formating: white spaces, brackets, etc fixed
r738 BarAnimation *animation = static_cast<BarAnimation *>(m_animations.value(item));
sauimone
Animation framework for barchart.
r671 Q_ASSERT(animation);
Jani Honkonen
Use same animation duration for all series animations.
r1079 animation->setDuration(ChartAnimationDuration);
sauimone
barchart animation mechanics working. still some todo
r681 animation->setKeyValueAt(0.0, qVariantFromValue(oldLayout));
animation->setKeyValueAt(1.0, qVariantFromValue(newLayout));
Marek Rosa
Animation folder formating: white spaces, brackets, etc fixed
r738 QTimer::singleShot(0, animation, SLOT(start()));
sauimone
Animation framework for barchart.
r671 }
Michal Klocek
Krazy reported errors...
r974 #include "moc_chartanimator_p.cpp"
Michal Klocek
Animation refactor...
r530 QTCOMMERCIALCHART_END_NAMESPACE