@@ -73,10 +73,10 void AreaChartItem::updatePath() | |||
|
73 | 73 | { |
|
74 | 74 | QPainterPath path; |
|
75 | 75 | |
|
76 |
path = m_upper-> |
|
|
76 | path = m_upper->path(); | |
|
77 | 77 | |
|
78 | 78 | if (m_lower) { |
|
79 |
path.connectPath(m_lower-> |
|
|
79 | path.connectPath(m_lower->path().toReversed()); | |
|
80 | 80 | } else { |
|
81 | 81 | QPointF first = path.pointAtPercent(0); |
|
82 | 82 | QPointF last = path.pointAtPercent(1); |
@@ -27,7 +27,7 | |||
|
27 | 27 | |
|
28 | 28 | QTCOMMERCIALCHART_BEGIN_NAMESPACE |
|
29 | 29 | |
|
30 |
const qreal mouseEventMinWidth(1 |
|
|
30 | const qreal mouseEventMinWidth(12); | |
|
31 | 31 | |
|
32 | 32 | LineChartItem::LineChartItem(QLineSeries* series,ChartPresenter *presenter): |
|
33 | 33 | XYChart(series, presenter), |
@@ -52,8 +52,11 public: | |||
|
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; } | |
|
56 | ||
|
55 | 57 | public Q_SLOTS: |
|
56 | 58 | void handleUpdated(); |
|
59 | ||
|
57 | 60 | protected: |
|
58 | 61 | void updateGeometry(); |
|
59 | 62 | void mousePressEvent(QGraphicsSceneMouseEvent *event); |
@@ -65,7 +68,6 private: | |||
|
65 | 68 | QPen m_linePen; |
|
66 | 69 | QPen m_pointPen; |
|
67 | 70 | bool m_pointsVisible; |
|
68 | ||
|
69 | 71 | }; |
|
70 | 72 | |
|
71 | 73 | QTCOMMERCIALCHART_END_NAMESPACE |
General Comments 0
You need to be logged in to leave comments.
Login now