##// END OF EJS Templates
added _p to private class headers
added _p to private class headers

File last commit:

r349:7594bc4927de
r381:8ab9ba5c10bd
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
Rename QLineChartSeries to QLineSeries
r349 class QLineSeries;
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
Rename QLineChartSeries to QLineSeries
r349 LineChartItem(ChartPresenter* presenter, QLineSeries* series,QGraphicsItem *parent = 0);
Michal Klocek
Fix naming convention for lineseries...
r144 ~ 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
Rename QLineChartSeries to QLineSeries
r349 void calculatePoint(QPointF& point, int index, const QLineSeries* series,const QSizeF& size, const Domain& domain) const;
void calculatePoints(QVector<QPointF>& points,QHash<int,int>& hash,const QLineSeries* 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
Rename QLineChartSeries to QLineSeries
r349 QLineSeries* 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