@@ -307,8 +307,6 QAbstractAxis *QChart::axisX(QAbstractSeries *series) const | |||||
307 | { |
|
307 | { | |
308 | if(!series && d_ptr->m_dataset->series().size()>0){ |
|
308 | if(!series && d_ptr->m_dataset->series().size()>0){ | |
309 | series = d_ptr->m_dataset->series().first(); |
|
309 | series = d_ptr->m_dataset->series().first(); | |
310 | }else{ |
|
|||
311 | return 0; |
|
|||
312 | } |
|
310 | } | |
313 |
|
311 | |||
314 | QList<QAbstractAxis*> axes = series->attachedAxes(); |
|
312 | QList<QAbstractAxis*> axes = series->attachedAxes(); | |
@@ -336,8 +334,6 QAbstractAxis *QChart::axisY(QAbstractSeries *series) const | |||||
336 | { |
|
334 | { | |
337 | if(!series && d_ptr->m_dataset->series().size()>0) { |
|
335 | if(!series && d_ptr->m_dataset->series().size()>0) { | |
338 | series = d_ptr->m_dataset->series().first(); |
|
336 | series = d_ptr->m_dataset->series().first(); | |
339 | } else { |
|
|||
340 | return 0; |
|
|||
341 | } |
|
337 | } | |
342 |
|
338 | |||
343 | QList<QAbstractAxis*> axes = series->attachedAxes(); |
|
339 | QList<QAbstractAxis*> axes = series->attachedAxes(); | |
@@ -536,10 +532,8 void QChart::setAxisX(QAbstractAxis *axis , QAbstractSeries *series) | |||||
536 | QList<QAbstractAxis*> list = axes(Qt::Horizontal,series); |
|
532 | QList<QAbstractAxis*> list = axes(Qt::Horizontal,series); | |
537 |
|
533 | |||
538 | foreach(QAbstractAxis* a, list){ |
|
534 | foreach(QAbstractAxis* a, list){ | |
539 | if(a->alignment()==axis->alignment()){ |
|
535 | d_ptr->m_dataset->removeAxis(a); | |
540 | d_ptr->m_dataset->removeAxis(a); |
|
536 | delete a; | |
541 | delete a; |
|
|||
542 | } |
|
|||
543 | } |
|
537 | } | |
544 |
|
538 | |||
545 | if(!d_ptr->m_dataset->axes().contains(axis)) |
|
539 | if(!d_ptr->m_dataset->axes().contains(axis)) | |
@@ -557,10 +551,8 void QChart::setAxisY(QAbstractAxis *axis , QAbstractSeries *series) | |||||
557 | QList<QAbstractAxis*> list = axes(Qt::Vertical,series); |
|
551 | QList<QAbstractAxis*> list = axes(Qt::Vertical,series); | |
558 |
|
552 | |||
559 | foreach(QAbstractAxis* a, list) { |
|
553 | foreach(QAbstractAxis* a, list) { | |
560 | if(a->alignment()==axis->alignment()) { |
|
554 | d_ptr->m_dataset->removeAxis(a); | |
561 | d_ptr->m_dataset->removeAxis(a); |
|
555 | delete a; | |
562 | delete a; |
|
|||
563 | } |
|
|||
564 | } |
|
556 | } | |
565 |
|
557 | |||
566 | if(!d_ptr->m_dataset->axes().contains(axis)) |
|
558 | if(!d_ptr->m_dataset->axes().contains(axis)) |
General Comments 0
You need to be logged in to leave comments.
Login now