! Returns the layer with the specified \a name. If there is no layer with the specified name, \c nullptr is returned. Layer names are case-sensitive. \see addLayer, moveLayer, removeLayer */
| 14661 | \see addLayer, moveLayer, removeLayer |
| 14662 | */ |
| 14663 | QCPLayer *QCustomPlot::layer(const QString &name) const |
| 14664 | { |
| 14665 | foreach (QCPLayer *layer, mLayers) |
| 14666 | { |
| 14667 | if (layer->name() == name) |
| 14668 | return layer; |
| 14669 | } |
| 14670 | return nullptr; |
| 14671 | } |
| 14672 | |
| 14673 | /*! \overload |
| 14674 |
no test coverage detected