! Returns the item with \a index. If the index is invalid, returns \c nullptr. There is an overloaded version of this function with no parameter which returns the last added item, see QCustomPlot::item() \see itemCount */
| 14524 | \see itemCount |
| 14525 | */ |
| 14526 | QCPAbstractItem *QCustomPlot::item(int index) const |
| 14527 | { |
| 14528 | if (index >= 0 && index < mItems.size()) |
| 14529 | { |
| 14530 | return mItems.at(index); |
| 14531 | } else |
| 14532 | { |
| 14533 | qDebug() << Q_FUNC_INFO << "index out of bounds:" << index; |
| 14534 | return nullptr; |
| 14535 | } |
| 14536 | } |
| 14537 | |
| 14538 | /*! \overload |
| 14539 |
no test coverage detected