##// END OF EJS Templates
Adds updated handling for line series
Adds updated handling for line series

File last commit:

r391:7d2e92012cfd
r392:938f3d3eaf7c
Show More
linechartanimationitem_p.h
50 lines | 1.2 KiB | text/x-c | CLexer
/ src / linechart / linechartanimationitem_p.h
Michal Klocek
Fix previous broken commit
r145 #ifndef LINECHARTANIMATIONITEM_P_H_
#define LINECHARTANIMATIONITEM_P_H_
Michal Klocek
Refactors qchart , adds line animation...
r131
#include "qchartglobal.h"
Michal Klocek
Fix previous broken commit
r145 #include "linechartitem_p.h"
Michal Klocek
Refactors qchart , adds line animation...
r131 #include "domain_p.h"
Michal Klocek
Fix commit 7b90ec69ce9a3353820d295c222ef3f79537484d
r391 #include <QVariantAnimation>
Michal Klocek
Refactors qchart , adds line animation...
r131
QTCOMMERCIALCHART_BEGIN_NAMESPACE
Michal Klocek
Fix commit 7b90ec69ce9a3353820d295c222ef3f79537484d
r391 class LineChartAnimatator;
Michal Klocek
Refactors qchart , adds line animation...
r131
Michal Klocek
Fix previous broken commit
r145 class LineChartAnimationItem : public LineChartItem {
Michal Klocek
Rewrite animation hadnling in line series...
r389
Michal Klocek
Fix commit 7b90ec69ce9a3353820d295c222ef3f79537484d
r391 Q_OBJECT
Michal Klocek
Refactors qchart , adds line animation...
r131 public:
Michal Klocek
Rename QLineChartSeries to QLineSeries
r349 LineChartAnimationItem(ChartPresenter* presenter, QLineSeries *series, QGraphicsItem *parent = 0);
Michal Klocek
Refactors qchart , adds line animation...
r131 virtual ~LineChartAnimationItem();
Michal Klocek
Fix commit 7b90ec69ce9a3353820d295c222ef3f79537484d
r391 protected:
virtual void updateItem(QVector<QPointF>& oldPoints,QVector<QPointF>& newPoints);
virtual void updateItem(QVector<QPointF>& oldPoints,int index,QPointF& newPoint);
private slots:
void startAnimation();
Michal Klocek
Refactors qchart , adds line animation...
r131
private:
Michal Klocek
Fix commit 7b90ec69ce9a3353820d295c222ef3f79537484d
r391 LineChartAnimatator *m_animation;
QVector<QPointF> m_points;
bool m_dirty;
Michal Klocek
Refactors qchart , adds line animation...
r131 };
Michal Klocek
Rewrite animation hadnling in line series...
r389 class LineChartAnimatator: public QVariantAnimation
Michal Klocek
Refactors qchart , adds line animation...
r131 {
public:
Michal Klocek
Fix commit 7b90ec69ce9a3353820d295c222ef3f79537484d
r391 LineChartAnimatator(LineChartAnimationItem *item, QObject *parent = 0 );
~LineChartAnimatator();
Michal Klocek
Rewrite animation hadnling in line series...
r389
Michal Klocek
Fix commit 7b90ec69ce9a3353820d295c222ef3f79537484d
r391 protected:
QVariant interpolated(const QVariant &start, const QVariant & end, qreal progress ) const;
void updateCurrentValue (const QVariant & value );
private:
Michal Klocek
Refactors qchart , adds line animation...
r131 LineChartAnimationItem* m_item;
};
QTCOMMERCIALCHART_END_NAMESPACE
Michal Klocek
Fix previous broken commit
r145 #endif