! Returns the QCPItemPosition with the specified \a name. If this item doesn't have a position by that name, returns \c nullptr. This function provides an alternative way to access item positions. Normally, you access positions direcly by their member pointers (which typically have the same variable name as \a name). \see positions, anchor */
| 13034 | \see positions, anchor |
| 13035 | */ |
| 13036 | QCPItemPosition *QCPAbstractItem::position(const QString &name) const |
| 13037 | { |
| 13038 | foreach (QCPItemPosition *position, mPositions) |
| 13039 | { |
| 13040 | if (position->name() == name) |
| 13041 | return position; |
| 13042 | } |
| 13043 | qDebug() << Q_FUNC_INFO << "position with name not found:" << name; |
| 13044 | return nullptr; |
| 13045 | } |
| 13046 | |
| 13047 | /*! |
| 13048 | Returns the QCPItemAnchor with the specified \a name. If this item doesn't have an anchor by |