##// END OF EJS Templates
Refactora axis and line chart to use graphics items insted of painter.
Refactora axis and line chart to use graphics items insted of painter.

File last commit:

r85:f77f13ee265a
r85:f77f13ee265a
Show More
xylinechartitem_p.h
39 lines | 845 B | text/x-c | CLexer
#ifndef XYLINECHARTITEM_H
#define XYLINECHARTITEM_H
#include "qchartglobal.h"
#include "chartitem_p.h"
QTCOMMERCIALCHART_BEGIN_NAMESPACE
class QXYChartSeries;
class XYLineChartItem : public ChartItem
{
public:
XYLineChartItem(QXYChartSeries* m_series,QGraphicsItem *parent = 0);
~ XYLineChartItem(){};
//from QGraphicsItem
QRectF boundingRect() const;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget){};
// virtual QPainterPath shape() const;
//from ChartItem
void setSize(const QSize& size);
void setPlotDomain(const PlotDomain& data);
private:
void updateGeometry();
private:
QRect m_rect;
QPolygonF m_polyline;
QXYChartSeries* m_series;
PlotDomain m_plotDomain;
QGraphicsPathItem *m_pathItem;
};
QTCOMMERCIALCHART_END_NAMESPACE
#endif