##// END OF EJS Templates
Bugfix area chart not drawn after drawLine change in lineseries
Michal Klocek -
r1827:f8179c45a147
parent child
Show More
@@ -1,76 +1,76
1 1 /****************************************************************************
2 2 **
3 3 ** Copyright (C) 2012 Digia Plc
4 4 ** All rights reserved.
5 5 ** For any questions to Digia, please use contact form at http://qt.digia.com
6 6 **
7 7 ** This file is part of the Qt Commercial Charts Add-on.
8 8 **
9 9 ** $QT_BEGIN_LICENSE$
10 10 ** Licensees holding valid Qt Commercial licenses may use this file in
11 11 ** accordance with the Qt Commercial License Agreement provided with the
12 12 ** Software or, alternatively, in accordance with the terms contained in
13 13 ** a written agreement between you and Digia.
14 14 **
15 15 ** If you have questions regarding the use of this file, please use
16 16 ** contact form at http://qt.digia.com
17 17 ** $QT_END_LICENSE$
18 18 **
19 19 ****************************************************************************/
20 20
21 21 // W A R N I N G
22 22 // -------------
23 23 //
24 24 // This file is not part of the QtCommercial Chart API. It exists purely as an
25 25 // implementation detail. This header file may change from version to
26 26 // version without notice, or even be removed.
27 27 //
28 28 // We mean it.
29 29
30 30 #ifndef LINECHARTITEM_H
31 31 #define LINECHARTITEM_H
32 32
33 33 #include "qchartglobal.h"
34 34 #include "xychart_p.h"
35 35 #include <QPen>
36 36
37 37 QTCOMMERCIALCHART_BEGIN_NAMESPACE
38 38
39 39 class QLineSeries;
40 40 class ChartPresenter;
41 41
42 42 class LineChartItem : public XYChart , public QGraphicsItem
43 43 {
44 44 Q_OBJECT
45 45 Q_INTERFACES(QGraphicsItem)
46 46 public:
47 47 explicit LineChartItem(QLineSeries *series,ChartPresenter *presenter);
48 48 ~LineChartItem() {}
49 49
50 50 //from QGraphicsItem
51 51 QRectF boundingRect() const;
52 52 void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
53 53 QPainterPath shape() const;
54 54
55 QPainterPath path() const { return m_path; }
55 QPainterPath path() const { return m_linePath; }
56 56
57 57 public Q_SLOTS:
58 58 void handleUpdated();
59 59
60 60 protected:
61 61 void updateGeometry();
62 62 void mousePressEvent(QGraphicsSceneMouseEvent *event);
63 63
64 64 private:
65 65 QLineSeries* m_series;
66 66 QPainterPath m_path;
67 67 QPainterPath m_linePath;
68 68 QVector<QPointF> m_points;
69 69 QRectF m_rect;
70 70 QPen m_linePen;
71 71 bool m_pointsVisible;
72 72 };
73 73
74 74 QTCOMMERCIALCHART_END_NAMESPACE
75 75
76 76 #endif
General Comments 0
You need to be logged in to leave comments. Login now