chartanimator_p.h
53 lines
| 1.7 KiB
| text/x-c
|
CLexer
|
r530 | #ifndef CHARTANIMATOR_P_H_ | ||
#define CHARTANIMATOR_P_H_ | ||||
#include "qchartglobal.h" | ||||
#include "chartanimation_p.h" | ||||
|
r618 | #include "piechartitem_p.h" | ||
|
r531 | #include <QPointF> | ||
|
r530 | |||
QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||||
class ChartItem; | ||||
class AxisItem; | ||||
|
r560 | class AreaChartItem; | ||
|
r622 | class SplineChartItem; | ||
class ScatterChartItem; | ||||
class LineChartItem; | ||||
class XYChartItem; | ||||
|
r530 | |||
class ChartAnimator : public QObject { | ||||
public: | ||||
|
r531 | //TODO: this should be flags in case of two state at the time | ||
enum State{ShowState, ScrollUpState, ScrollDownState, ScrollLeftState,ScrollRightState,ZoomInState,ZoomOutState}; | ||||
|
r530 | ChartAnimator(QObject *parent = 0); | ||
virtual ~ChartAnimator(); | ||||
void addAnimation(AxisItem* item); | ||||
|
r618 | void addAnimation(PieChartItem* item); | ||
|
r622 | void addAnimation(ScatterChartItem* item); | ||
void addAnimation(LineChartItem* item); | ||||
void addAnimation(SplineChartItem* item); | ||||
|
r530 | void removeAnimation(ChartItem* item); | ||
void animationStarted(); | ||||
|
r622 | void updateLayout(XYChartItem* item, QVector<QPointF>& oldLayout,QVector<QPointF>& newLayout,int index); | ||
void updateLayout(SplineChartItem* item, QVector<QPointF>& oldPoints , QVector<QPointF>& newPoints, QVector<QPointF>& oldControlPoints, QVector<QPointF>& newContorlPoints,int index); | ||||
|
r530 | void applyLayout(AxisItem* item, QVector<qreal>& layout); | ||
|
r621 | void addAnimation(PieChartItem* item, QPieSlice *slice, PieSliceLayout &layout); | ||
void removeAnimation(PieChartItem* item, QPieSlice *slice); | ||||
void updateLayout(PieChartItem* item, QVector<PieSliceLayout> &layout); | ||||
|
r618 | void updateLayout(PieChartItem* item, PieSliceLayout &layout); | ||
|
r531 | void setState(State state,const QPointF& point = QPointF()); | ||
|
r530 | private: | ||
QMap<ChartItem*,ChartAnimation*> m_animations; | ||||
|
r531 | State m_state; | ||
QPointF m_point; | ||||
|
r530 | }; | ||
QTCOMMERCIALCHART_END_NAMESPACE | ||||
#endif | ||||