| 68 | } |
| 69 | |
| 70 | void AxisSettings::Private::currentIndexChanged(int index) |
| 71 | { |
| 72 | m_currentAxis = nullptr; |
| 73 | const CartesianAxis::Position pos = ( CartesianAxis::Position )ui.axisSelection->itemData(index).toInt(); |
| 74 | auto *plane = qobject_cast<CartesianCoordinatePlane *>(m_chart->coordinatePlane()); |
| 75 | auto *diag = qobject_cast<AbstractCartesianDiagram *>(m_chart->coordinatePlane()->diagram()); |
| 76 | if (plane && diag) { |
| 77 | QVector<CartesianAxis *> axes = diag->axes().toVector(); |
| 78 | Q_FOREACH (CartesianAxis *axis, axes) { |
| 79 | if (axis->position() == pos) { |
| 80 | m_currentAxis = axis; |
| 81 | break; |
| 82 | } |
| 83 | } |
| 84 | } |
| 85 | updateUiForCurrentAxis(); |
| 86 | } |
| 87 | |
| 88 | void AxisSettings::Private::updateUiForCurrentAxis() |
| 89 | { |
no test coverage detected