##// END OF EJS Templates
Z order for pie
Tero Ahola -
r490:5facde66eb08
parent child
Show More
@@ -18,4 +18,5 SUBDIRS += linechart \
18 18 scatterinteractions \
19 19 splinechart \
20 20 areachart \
21 stackedbarchartdrilldown
21 stackedbarchartdrilldown \
22 customcolors
@@ -26,7 +26,8 public:
26 26 GridZValue,
27 27 AxisZValue,
28 28 LineChartZValue,
29 ScatterSeriesZValue
29 ScatterSeriesZValue,
30 PieSeriesZValue
30 31 };
31 32
32 33 ChartPresenter(QChart* chart,ChartDataSet *dataset);
@@ -2,6 +2,7
2 2 #include "pieslice_p.h"
3 3 #include "qpieslice.h"
4 4 #include "qpieseries.h"
5 #include "chartpresenter_p.h"
5 6 #include <QDebug>
6 7 #include <QPainter>
7 8
@@ -22,6 +23,9 PiePresenter::PiePresenter(QGraphicsItem *parent, QPieSeries *series)
22 23 changeSet.appendAdded(m_series->m_slices);
23 24 handleSeriesChanged(changeSet);
24 25 }
26
27 // Note: the following does not affect as long as the item does not have anything to paint
28 setZValue(ChartPresenter::PieSeriesZValue);
25 29 }
26 30
27 31 PiePresenter::~PiePresenter()
@@ -2,6 +2,7
2 2 #include "piepresenter_p.h"
3 3 #include "qpieseries.h"
4 4 #include "qpieslice.h"
5 #include "chartpresenter_p.h"
5 6 #include <QPainter>
6 7 #include <QDebug>
7 8 #include <qmath.h>
@@ -31,6 +32,7 PieSlice::PieSlice(QGraphicsItem* parent)
31 32 {
32 33 setAcceptHoverEvents(true);
33 34 setAcceptedMouseButtons(Qt::LeftButton);
35 setZValue(ChartPresenter::PieSeriesZValue);
34 36 }
35 37
36 38 PieSlice::~PieSlice()
General Comments 0
You need to be logged in to leave comments. Login now