##// END OF EJS Templates
refactored legend to qseries
refactored legend to qseries

File last commit:

r349:7594bc4927de
r380:0247ffcfa93f
Show More
linechartanimationitem_p.h
55 lines | 1.5 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"
QTCOMMERCIALCHART_BEGIN_NAMESPACE
Michal Klocek
Fix previous broken commit
r145 class LineChartItem;
Michal Klocek
Refactors qchart , adds line animation...
r131
Michal Klocek
Fix previous broken commit
r145 class LineChartAnimationItem : public LineChartItem {
Michal Klocek
Refactors qchart , adds line animation...
r131 Q_OBJECT
Q_PROPERTY(int a_addPoints READ ar_addPoints WRITE aw_addPoints);
// Q_PROPERTY(QPointF a_setPoint READ ar_setPoint WRITE aw_setPoint);
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();
void addPoints(const QVector<QPointF>& points);
void setPoint(int index,const QPointF& point);
//void removePoint(const QPointF& point){};
//void setPoint(const QPointF& oldPoint, const QPointF& newPoint){};
int ar_addPoints() const { return m_addPoints;}
void aw_addPoints(int points);
const QPointF& ar_setPoint() const { return m_setPoint;}
void aw_setPoint(int index,const QPointF& point);
private:
QVector<QPointF> m_data;
Domain m_domain;
int m_addPoints;
QPointF m_setPoint;
int m_setPoint_index;
};
class AnimationHelper: public QObject
{
Q_OBJECT
Q_PROPERTY(QPointF point READ point WRITE setPoint);
public:
AnimationHelper(LineChartAnimationItem* item,int index):m_item(item),m_index(index){};
void setPoint(const QPointF& point){
m_item->aw_setPoint(m_index,point);
}
QPointF point(){return m_point;}
QPointF m_point;
LineChartAnimationItem* m_item;
int m_index;
};
QTCOMMERCIALCHART_END_NAMESPACE
Michal Klocek
Fix previous broken commit
r145 #endif