MCPcopy Create free account
hub / github.com/collin80/SavvyCAN / createAnchor

Method createAnchor

qcustomplot.cpp:12507–12514  ·  view source on GitHub ↗

! \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.

Source from the content-addressed store, hash-verified

12505 \see createPosition
12506*/
12507QCPItemAnchor *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 */
12517void QCPAbstractItem::selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)

Callers

nothing calls this directly

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected