##// END OF EJS Templates
Adaptive layout to legend. Tries to fit all items inside given maximum size
Adaptive layout to legend. Tries to fit all items inside given maximum size

File last commit:

r571:0bb609016fcc
r626:b05202e4f2ef
Show More
linechartitem_p.h
43 lines | 848 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();
protected:
void setLayout(QVector<QPointF>& points);
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