##// END OF EJS Templates
Refactored themes; now enabled for line, scatter and pies...
Refactored themes; now enabled for line, scatter and pies Draft themes implemented for most of the series types. The themes are still missing most of the features, only the line color and line width can be defined.

File last commit:

r103:399cbfcd557c
r103:399cbfcd557c
Show More
xylinechartitem_p.h
45 lines | 1.0 KiB | text/x-c | CLexer
#ifndef XYLINECHARTITEM_H
#define XYLINECHARTITEM_H
#include "qchartglobal.h"
#include "chartitemcontrol.h"
#include "charttheme_p.h"
#include <QGraphicsItem>
QTCOMMERCIALCHART_BEGIN_NAMESPACE
class QXYChartSeries;
class XYLineChartItem : public QGraphicsItem, public ChartItemControl
{
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;
public: // from ChartItemControl
void setPos(const QPointF & pos);
void resize(const QSize &size);
void setTheme(ChartTheme *theme);
void setPlotDomain(const PlotDomain& data);
private:
void updateGeometry();
private:
QRect m_rect;
QPolygonF m_polyline;
QXYChartSeries* m_series;
PlotDomain m_plotDomain;
QGraphicsPathItem *m_pathItem;
SeriesTheme m_theme;
};
QTCOMMERCIALCHART_END_NAMESPACE
#endif