##// END OF EJS Templates
Added a pie chart customization example and refactoring the pie interface.
Added a pie chart customization example and refactoring the pie interface.

File last commit:

r393:61d1f8f10e51
r437:8d9e377a1065
Show More
axisanimationitem_p.h
45 lines | 959 B | text/x-c | CLexer
/ src / axisanimationitem_p.h
#ifndef AXISANIMATIONITEM_H_
#define AXISANIMATIONITEM_H_
#include "domain_p.h"
#include "axisitem_p.h"
#include <QGraphicsItem>
#include <QVariantAnimation>
QTCOMMERCIALCHART_BEGIN_NAMESPACE
class AxisAnimator;
class AxisAnimationItem : public AxisItem
{
Q_OBJECT
public:
AxisAnimationItem(AxisType type = X_AXIS,QGraphicsItem* parent = 0);
~AxisAnimationItem();
void setLabelsAngle(int angle);
protected:
virtual void updateItems(QVector<qreal>& oldLayout,QVector<qreal>& newLayout);
private:
AxisAnimator *m_animation;
};
class AxisAnimator: public QVariantAnimation
{
public:
AxisAnimator(AxisItem *axis,QObject *parent = 0);
~AxisAnimator();
protected:
virtual QVariant interpolated (const QVariant & from, const QVariant & to, qreal progress ) const;
virtual void updateCurrentValue (const QVariant & value );
private:
AxisItem* m_axis;
};
QTCOMMERCIALCHART_END_NAMESPACE
#endif /* AXISITEM_H_ */