@@ -541,7 +541,15 void QPieSeries::modelUpdated(QModelIndex topLeft, QModelIndex bottomRight) | |||||
541 | { |
|
541 | { | |
542 | // slices().at(topLeft.row())->setValue(m_model->data(m_model->index(topLeft.row(), topLeft.column()), Qt::DisplayRole).toDouble()); |
|
542 | // slices().at(topLeft.row())->setValue(m_model->data(m_model->index(topLeft.row(), topLeft.column()), Qt::DisplayRole).toDouble()); | |
543 | if (topLeft.column() == m_mapValues) |
|
543 | if (topLeft.column() == m_mapValues) | |
544 | slices().at(topLeft.row())->setValue(m_model->data(topLeft, Qt::DisplayRole).toDouble()); |
|
544 | if (m_mapValues == m_mapLabels) | |
|
545 | { | |||
|
546 | slices().at(topLeft.row())->setValue(m_model->data(topLeft, Qt::DisplayRole).toDouble()); | |||
|
547 | slices().at(topLeft.row())->setLabel(m_model->data(topLeft, Qt::DisplayRole).toString()); | |||
|
548 | } | |||
|
549 | else | |||
|
550 | { | |||
|
551 | slices().at(topLeft.row())->setValue(m_model->data(topLeft, Qt::DisplayRole).toDouble()); | |||
|
552 | } | |||
545 | else if (topLeft.column() == m_mapLabels) |
|
553 | else if (topLeft.column() == m_mapLabels) | |
546 | slices().at(topLeft.row())->setLabel(m_model->data(topLeft, Qt::DisplayRole).toString()); |
|
554 | slices().at(topLeft.row())->setLabel(m_model->data(topLeft, Qt::DisplayRole).toString()); | |
547 | } |
|
555 | } | |
@@ -549,7 +557,15 void QPieSeries::modelUpdated(QModelIndex topLeft, QModelIndex bottomRight) | |||||
549 | { |
|
557 | { | |
550 | // slices().at(topLeft.column())->setValue(m_model->data(m_model->index(topLeft.row(), topLeft.column()), Qt::DisplayRole).toDouble()); |
|
558 | // slices().at(topLeft.column())->setValue(m_model->data(m_model->index(topLeft.row(), topLeft.column()), Qt::DisplayRole).toDouble()); | |
551 | if (topLeft.row() == m_mapValues) |
|
559 | if (topLeft.row() == m_mapValues) | |
552 | slices().at(topLeft.column())->setValue(m_model->data(topLeft, Qt::DisplayRole).toDouble()); |
|
560 | if (m_mapValues == m_mapLabels) | |
|
561 | { | |||
|
562 | slices().at(topLeft.column())->setValue(m_model->data(topLeft, Qt::DisplayRole).toDouble()); | |||
|
563 | slices().at(topLeft.column())->setLabel(m_model->data(topLeft, Qt::DisplayRole).toString()); | |||
|
564 | } | |||
|
565 | else | |||
|
566 | { | |||
|
567 | slices().at(topLeft.column())->setValue(m_model->data(topLeft, Qt::DisplayRole).toDouble()); | |||
|
568 | } | |||
553 | else if (topLeft.row() == m_mapLabels) |
|
569 | else if (topLeft.row() == m_mapLabels) | |
554 | slices().at(topLeft.column())->setLabel(m_model->data(topLeft, Qt::DisplayRole).toString()); |
|
570 | slices().at(topLeft.column())->setLabel(m_model->data(topLeft, Qt::DisplayRole).toString()); | |
555 | } |
|
571 | } |
General Comments 0
You need to be logged in to leave comments.
Login now