! Returns the axis with the given \a index on the axis rect side specified with \a type. \see axisCount, axes */
| 17602 | \see axisCount, axes |
| 17603 | */ |
| 17604 | QCPAxis *QCPAxisRect::axis(QCPAxis::AxisType type, int index) const |
| 17605 | { |
| 17606 | QList<QCPAxis*> ax(mAxes.value(type)); |
| 17607 | if (index >= 0 && index < ax.size()) |
| 17608 | { |
| 17609 | return ax.at(index); |
| 17610 | } else |
| 17611 | { |
| 17612 | qDebug() << Q_FUNC_INFO << "Axis index out of bounds:" << index; |
| 17613 | return nullptr; |
| 17614 | } |
| 17615 | } |
| 17616 | |
| 17617 | /*! |
| 17618 | Returns all axes on the axis rect sides specified with \a types. |
no test coverage detected