axisanimationitem_p.h
45 lines
| 976 B
| text/x-c
|
CLexer
/ src / axisanimationitem_p.h
|
r291 | #ifndef AXISANIMATIONITEM_H_ | ||
#define AXISANIMATIONITEM_H_ | ||||
#include "domain_p.h" | ||||
#include "axisitem_p.h" | ||||
#include <QGraphicsItem> | ||||
#include <QVariantAnimation> | ||||
QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||||
|
r393 | class AxisAnimator; | ||
|
r291 | |||
class AxisAnimationItem : public AxisItem | ||||
{ | ||||
Q_OBJECT | ||||
public: | ||||
|
r439 | AxisAnimationItem(QChartAxis* axis,AxisType type = X_AXIS,QGraphicsItem* parent = 0); | ||
|
r291 | ~AxisAnimationItem(); | ||
void setLabelsAngle(int angle); | ||||
protected: | ||||
|
r393 | virtual void updateItems(QVector<qreal>& oldLayout,QVector<qreal>& newLayout); | ||
private: | ||||
AxisAnimator *m_animation; | ||||
|
r291 | }; | ||
class AxisAnimator: public QVariantAnimation | ||||
{ | ||||
public: | ||||
|
r303 | AxisAnimator(AxisItem *axis,QObject *parent = 0); | ||
|
r389 | ~AxisAnimator(); | ||
|
r291 | 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_ */ | ||||