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