@@ -31,9 +31,8 DrilldownChart::DrilldownChart(QGraphicsItem *parent, Qt::WindowFlags wFlags) | |||||
31 |
|
31 | |||
32 | void DrilldownChart::changeSeries(QAbstractSeries *series) |
|
32 | void DrilldownChart::changeSeries(QAbstractSeries *series) | |
33 | { |
|
33 | { | |
34 |
if (m_currentSeries) |
|
34 | if (m_currentSeries) | |
35 | removeSeries(m_currentSeries); |
|
35 | removeSeries(m_currentSeries); | |
36 | } |
|
|||
37 | m_currentSeries = series; |
|
36 | m_currentSeries = series; | |
38 | addSeries(series); |
|
37 | addSeries(series); | |
39 | setTitle(series->name()); |
|
38 | setTitle(series->name()); | |
@@ -43,7 +42,6 void DrilldownChart::changeSeries(QAbstractSeries *series) | |||||
43 | void DrilldownChart::handleClicked(QBarSet *barset, QString category) |
|
42 | void DrilldownChart::handleClicked(QBarSet *barset, QString category) | |
44 | { |
|
43 | { | |
45 | Q_UNUSED(barset) |
|
44 | Q_UNUSED(barset) | |
46 | Q_UNUSED(button) |
|
|||
47 | DrilldownBarSeries* series = static_cast<DrilldownBarSeries*> (sender()); |
|
45 | DrilldownBarSeries* series = static_cast<DrilldownBarSeries*> (sender()); | |
48 | changeSeries(series->drilldownSeries(category)); |
|
46 | changeSeries(series->drilldownSeries(category)); | |
49 | } |
|
47 | } |
@@ -35,6 +35,7 Bar::Bar(QBarSet *barset, QString category, QGraphicsItem *parent) : QGraphicsRe | |||||
35 |
|
35 | |||
36 | void Bar::mousePressEvent(QGraphicsSceneMouseEvent *event) |
|
36 | void Bar::mousePressEvent(QGraphicsSceneMouseEvent *event) | |
37 | { |
|
37 | { | |
|
38 | Q_UNUSED(event) | |||
38 | emit clicked(m_category); |
|
39 | emit clicked(m_category); | |
39 | emit clicked(m_barset, m_category); |
|
40 | emit clicked(m_barset, m_category); | |
40 | } |
|
41 | } |
General Comments 0
You need to be logged in to leave comments.
Login now