##// END OF EJS Templates
Now using percent bar series in theme demo
Now using percent bar series in theme demo

File last commit:

r465:7f683774d508
r521:1e41568aab09
Show More
linechartanimationitem_p.h
50 lines | 1.1 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
Refactor domain model...
r439 LineChartAnimationItem(QLineSeries *series, QGraphicsItem *parent = 0);
Michal Klocek
Refactors qchart , adds line animation...
r131 virtual ~LineChartAnimationItem();
Michal Klocek
Fix commit 7b90ec69ce9a3353820d295c222ef3f79537484d
r391 protected:
Michal Klocek
Refactor line spline to common xyline...
r465 virtual void updatePoints(QVector<QPointF>& newPoints);
Michal Klocek
Refactors linechart update calls
r464 virtual void updatePoint(int index,QPointF& newPoint);
Michal Klocek
Fix commit 7b90ec69ce9a3353820d295c222ef3f79537484d
r391
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