##// END OF EJS Templates
Refactoring the pie for animations (no actual animations yet)
Refactoring the pie for animations (no actual animations yet)

File last commit:

r557:6b65c67e3745
r566:875089213706
Show More
linechartitem_p.h
47 lines | 960 B | text/x-c | CLexer
#ifndef LINECHARTITEM_H
#define LINECHARTITEM_H
#include "qchartglobal.h"
#include "xychartitem_p.h"
#include <QPen>
QTCOMMERCIALCHART_BEGIN_NAMESPACE
class QLineSeries;
class LineChartItem : public XYChartItem
{
Q_OBJECT
public:
explicit LineChartItem(QLineSeries* series,QGraphicsItem *parent = 0);
~ LineChartItem(){};
//from QGraphicsItem
QRectF boundingRect() const;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
QPainterPath shape() const;
public slots:
void handleUpdated();
signals:
void clicked(const QPointF& point);
protected:
void setLayout(QVector<QPointF>& points);
void mousePressEvent( QGraphicsSceneMouseEvent * event );
private:
QLineSeries* m_series;
QGraphicsItemGroup m_items;
QPainterPath m_path;
QRectF m_rect;
QPen m_linePen;
QPen m_pointPen;
bool m_pointsVisible;
};
QTCOMMERCIALCHART_END_NAMESPACE
#endif