@@ -327,13 +327,30 int ChartDataSet::seriesIndex(QAbstractSeries *series) | |||||
327 |
|
327 | |||
328 | QAbstractAxis* ChartDataSet::axisX(QAbstractSeries *series) const |
|
328 | QAbstractAxis* ChartDataSet::axisX(QAbstractSeries *series) const | |
329 | { |
|
329 | { | |
330 | if(series == 0) return m_seriesAxisXMap.begin().value(); |
|
330 | if(series == 0) { | |
|
331 | ||||
|
332 | QMapIterator<QAbstractSeries*, QAbstractAxis *> i(m_seriesAxisXMap); | |||
|
333 | ||||
|
334 | while (i.hasNext()) { | |||
|
335 | i.next(); | |||
|
336 | if(i.value()->isVisible()) return i.value(); | |||
|
337 | } | |||
|
338 | return 0; | |||
|
339 | } | |||
331 | return m_seriesAxisXMap.value(series); |
|
340 | return m_seriesAxisXMap.value(series); | |
332 | } |
|
341 | } | |
333 |
|
342 | |||
334 | QAbstractAxis* ChartDataSet::axisY(QAbstractSeries *series) const |
|
343 | QAbstractAxis* ChartDataSet::axisY(QAbstractSeries *series) const | |
335 | { |
|
344 | { | |
336 | if(series == 0) return m_seriesAxisYMap.begin().value(); |
|
345 | if(series == 0) { | |
|
346 | QMapIterator<QAbstractSeries*, QAbstractAxis *> i(m_seriesAxisYMap); | |||
|
347 | ||||
|
348 | while (i.hasNext()) { | |||
|
349 | i.next(); | |||
|
350 | if(i.value()->isVisible()) return i.value(); | |||
|
351 | } | |||
|
352 | return 0; | |||
|
353 | } | |||
337 | return m_seriesAxisYMap.value(series); |
|
354 | return m_seriesAxisYMap.value(series); | |
338 | } |
|
355 | } | |
339 |
|
356 |
General Comments 0
You need to be logged in to leave comments.
Login now