##// END OF EJS Templates
minor. axis grey to lightGrey
minor. axis grey to lightGrey

File last commit:

r185:71bb456d2e5e
r187:75f1a3de7c19
Show More
linechartitem_p.h
74 lines | 2.1 KiB | text/x-c | CLexer
Michal Klocek
Fix naming convention for lineseries...
r144 #ifndef LINECHARTITEM_H
#define LINECHARTITEM_H
Michal Klocek
Refactor current draft to fit int current design specs...
r21
Tero Ahola
Renamed to QtCommercialChart
r30 #include "qchartglobal.h"
Tero Ahola
Refactoring continued: restored ChartItem class
r104 #include "chartitem_p.h"
Michal Klocek
Refactored for MVP...
r139 #include <QPen>
Michal Klocek
Refactor current draft to fit int current design specs...
r21
Tero Ahola
Renamed to QtCommercialChart
r30 QTCOMMERCIALCHART_BEGIN_NAMESPACE
Michal Klocek
Refactor current draft to fit int current design specs...
r21
Michal Klocek
Refactors qchart , adds line animation...
r131 class ChartPresenter;
Michal Klocek
Fix naming convention for lineseries...
r144 class QLineChartSeries;
Michal Klocek
Refactors qchart , adds line animation...
r131 class LineChartAnimationItem;
Michal Klocek
Refactor current draft to fit int current design specs...
r21
Michal Klocek
Fix naming convention for lineseries...
r144 class LineChartItem : public QObject , public ChartItem
Michal Klocek
Refactor current draft to fit int current design specs...
r21 {
Michal Klocek
Refactors qchart , adds line animation...
r131 Q_OBJECT
Michal Klocek
Refactor current draft to fit int current design specs...
r21 public:
Michal Klocek
Fix naming convention for lineseries...
r144 LineChartItem(ChartPresenter* presenter, QLineChartSeries* series,QGraphicsItem *parent = 0);
~ LineChartItem(){};
Michal Klocek
Refactor current draft to fit int current design specs...
r21
//from QGraphicsItem
Michal Klocek
Add zoom support...
r67 QRectF boundingRect() const;
Tero Ahola
One more alternative for changing themes
r108 void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
Michal Klocek
Refactors qchart , adds line animation...
r131 QPainterPath shape() const;
Michal Klocek
Refactored for MVP...
r139
void setPen(const QPen& pen);
const Domain& domain() const { return m_domain;}
Michal Klocek
Refactor current draft to fit int current design specs...
r21
Michal Klocek
Refactors qchart , adds line animation...
r131 virtual void addPoint(const QPointF& );
virtual void addPoints(const QVector<QPointF>& points);
virtual void removePoint(const QPointF& point);
virtual void setPoint(const QPointF& oldPoint, const QPointF& newPoint);
virtual void setPoint(int index,const QPointF& point);
Michal Klocek
Add pointsVisible setting for line series
r185 void setPointsVisible(bool visible);
Michal Klocek
Refactors qchart , adds line animation...
r131 void clear();
void clearView();
int count() const { return m_data.size();}
const QVector<QPointF>& points(){ return m_data;}
protected:
virtual void updateGeometry();
virtual void updateData();
virtual void updateDomain();
//refactor
Michal Klocek
Fix naming convention for lineseries...
r144 void calculatePoint(QPointF& point, int index, const QLineChartSeries* series,const QSizeF& size, const Domain& domain) const;
void calculatePoints(QVector<QPointF>& points,QHash<int,int>& hash,const QLineChartSeries* series, const QSizeF& size, const Domain& domain) const;
Michal Klocek
Refactors qchart , adds line animation...
r131
Michal Klocek
Refactored for MVP...
r139 protected slots:
void handleModelChanged(int index);
void handleDomainChanged(const Domain& domain);
void handleGeometryChanged(const QRectF& size);
Michal Klocek
Refactor current draft to fit int current design specs...
r21
private:
Michal Klocek
Refactors qchart , adds line animation...
r131 ChartPresenter* m_presenter;
QPainterPath m_path;
QSizeF m_size;
QRectF m_rect;
Michal Klocek
Adds cliping and proper zoom handling for line chart
r150 QRectF m_clipRect;
Michal Klocek
Refactors qchart , adds line animation...
r131 Domain m_domain;
QList<QGraphicsItem*> m_points;
QVector<QPointF> m_data;
QHash<int,int> m_hash;
Michal Klocek
Fix naming convention for lineseries...
r144 QLineChartSeries* m_series;
Michal Klocek
Refactored for MVP...
r139 QPen m_pen;
Michal Klocek
Refactors qchart , adds line animation...
r131 bool m_dirtyData;
bool m_dirtyGeometry;
bool m_dirtyDomain;
Michal Klocek
Refactor current draft to fit int current design specs...
r21 };
Tero Ahola
Renamed to QtCommercialChart
r30 QTCOMMERCIALCHART_END_NAMESPACE
Michal Klocek
Refactor current draft to fit int current design specs...
r21
#endif