chartanimator_p.h
58 lines
| 1.9 KiB
| text/x-c
|
CLexer
Michal Klocek
|
r530 | #ifndef CHARTANIMATOR_P_H_ | ||
#define CHARTANIMATOR_P_H_ | ||||
#include "qchartglobal.h" | ||||
#include "chartanimation_p.h" | ||||
Jani Honkonen
|
r618 | #include "piechartitem_p.h" | ||
sauimone
|
r671 | #include "barchartitem_p.h" | ||
Michal Klocek
|
r531 | #include <QPointF> | ||
Michal Klocek
|
r530 | |||
QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||||
class ChartItem; | ||||
Michal Klocek
|
r677 | class Axis; | ||
Michal Klocek
|
r560 | class AreaChartItem; | ||
Michal Klocek
|
r622 | class SplineChartItem; | ||
class ScatterChartItem; | ||||
class LineChartItem; | ||||
class XYChartItem; | ||||
Michal Klocek
|
r530 | |||
class ChartAnimator : public QObject { | ||||
public: | ||||
Michal Klocek
|
r531 | enum State{ShowState, ScrollUpState, ScrollDownState, ScrollLeftState,ScrollRightState,ZoomInState,ZoomOutState}; | ||
Michal Klocek
|
r677 | Q_DECLARE_FLAGS(States, State); | ||
Michal Klocek
|
r530 | ChartAnimator(QObject *parent = 0); | ||
virtual ~ChartAnimator(); | ||||
Michal Klocek
|
r677 | void addAnimation(Axis* item); | ||
Jani Honkonen
|
r618 | void addAnimation(PieChartItem* item); | ||
Michal Klocek
|
r622 | void addAnimation(ScatterChartItem* item); | ||
void addAnimation(LineChartItem* item); | ||||
void addAnimation(SplineChartItem* item); | ||||
sauimone
|
r671 | void addAnimation(BarChartItem* item); | ||
Michal Klocek
|
r677 | void removeAnimation(Chart* item); | ||
Michal Klocek
|
r530 | |||
void animationStarted(); | ||||
Michal Klocek
|
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); | ||||
Michal Klocek
|
r677 | void updateLayout(Axis* item, QVector<qreal>& layout); | ||
Michal Klocek
|
r530 | |||
Jani Honkonen
|
r668 | void addAnimation(PieChartItem* item, QPieSlice *slice, const PieSliceData &sliceData, bool isEmpty); | ||
Jani Honkonen
|
r621 | void removeAnimation(PieChartItem* item, QPieSlice *slice); | ||
Jani Honkonen
|
r629 | void updateLayout(PieChartItem* item, const PieLayout &layout); | ||
Jani Honkonen
|
r668 | void updateLayout(PieChartItem* item, QPieSlice *slice, const PieSliceData &sliceData); | ||
Jani Honkonen
|
r618 | |||
sauimone
|
r681 | void updateLayout(BarChartItem* item, const QVector<QRectF> &oldLayout, const QVector<QRectF> &newLayout); | ||
sauimone
|
r671 | |||
Michal Klocek
|
r531 | void setState(State state,const QPointF& point = QPointF()); | ||
Michal Klocek
|
r530 | private: | ||
Michal Klocek
|
r677 | QMap<Chart*,ChartAnimation*> m_animations; | ||
Michal Klocek
|
r531 | State m_state; | ||
QPointF m_point; | ||||
Michal Klocek
|
r530 | }; | ||
QTCOMMERCIALCHART_END_NAMESPACE | ||||
#endif | ||||