##// END OF EJS Templates
Add animations to pie. Works but has some visual issues when adding slices.
Add animations to pie. Works but has some visual issues when adding slices.

File last commit:

r618:249071e508d1
r618:249071e508d1
Show More
piesliceanimation_p.h
30 lines | 705 B | text/x-c | CLexer
/ src / animations / piesliceanimation_p.h
Jani Honkonen
Add animations to pie. Works but has some visual issues when adding slices.
r618 #ifndef PIESLICEANIMATION_P_H_
#define PIESLICEANIMATION_P_H_
#include "piechartitem_p.h"
#include <QVariantAnimation>
QTCOMMERCIALCHART_BEGIN_NAMESPACE
class PieChartItem;
class PieSliceAnimation : public QVariantAnimation
{
public:
PieSliceAnimation(PieChartItem *item);
~PieSliceAnimation();
void setValue(PieSliceLayout& startValue, PieSliceLayout& endValue);
void updateValue(PieSliceLayout& endValue);
PieSliceLayout currentSliceValue();
protected:
QVariant interpolated(const QVariant &start, const QVariant &end, qreal progress) const;
void updateCurrentValue(const QVariant &value);
private:
PieChartItem *m_item;
};
QTCOMMERCIALCHART_END_NAMESPACE
#endif