! \internal Creates a QCPItemAnchor, registers it with this item and returns a pointer to it. The specified \a name must be a unique string that is usually identical to the variable name of the anchor member (This is needed to provide the name based \ref anchor access to anchors). The \a anchorId must be a number identifying the created anchor. It is recommended to create an enum (e.
| 12505 | \see createPosition |
| 12506 | */ |
| 12507 | QCPItemAnchor *QCPAbstractItem::createAnchor(const QString &name, int anchorId) |
| 12508 | { |
| 12509 | if (hasAnchor(name)) |
| 12510 | qDebug() << Q_FUNC_INFO << "anchor/position with name exists already:" << name; |
| 12511 | QCPItemAnchor *newAnchor = new QCPItemAnchor(mParentPlot, this, name, anchorId); |
| 12512 | mAnchors.append(newAnchor); |
| 12513 | return newAnchor; |
| 12514 | } |
| 12515 | |
| 12516 | /* inherits documentation from base class */ |
| 12517 | void QCPAbstractItem::selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged) |