linechartitem_p.h
43 lines
| 848 B
| text/x-c
|
CLexer
|
r144 | #ifndef LINECHARTITEM_H | ||
#define LINECHARTITEM_H | ||||
|
r21 | |||
|
r30 | #include "qchartglobal.h" | ||
|
r465 | #include "xychartitem_p.h" | ||
|
r139 | #include <QPen> | ||
|
r21 | |||
|
r30 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||
|
r21 | |||
|
r349 | class QLineSeries; | ||
|
r21 | |||
|
r465 | class LineChartItem : public XYChartItem | ||
|
r21 | { | ||
|
r131 | Q_OBJECT | ||
|
r21 | public: | ||
|
r470 | explicit LineChartItem(QLineSeries* series,QGraphicsItem *parent = 0); | ||
|
r144 | ~ LineChartItem(){}; | ||
|
r21 | |||
//from QGraphicsItem | ||||
|
r67 | QRectF boundingRect() const; | ||
|
r108 | void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); | ||
|
r131 | QPainterPath shape() const; | ||
|
r139 | |||
|
r389 | public slots: | ||
|
r392 | void handleUpdated(); | ||
|
r21 | |||
|
r464 | protected: | ||
|
r557 | void setLayout(QVector<QPointF>& points); | ||
|
r464 | |||
|
r465 | private: | ||
|
r419 | QLineSeries* m_series; | ||
|
r391 | QGraphicsItemGroup m_items; | ||
|
r465 | QPainterPath m_path; | ||
QRectF m_rect; | ||||
|
r544 | QPen m_linePen; | ||
QPen m_pointPen; | ||||
bool m_pointsVisible; | ||||
|
r131 | |||
|
r21 | }; | ||
|
r30 | QTCOMMERCIALCHART_END_NAMESPACE | ||
|
r21 | |||
#endif | ||||