MCPcopy Index your code
hub / github.com/Audio4Linux/JDSP4Linux / createPosition

Method createPosition

3rdparty/qcustomplot/qcustomplot.cpp:13190–13203  ·  view source on GitHub ↗

! \internal Creates a QCPItemPosition, 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 position member (This is needed to provide the name-based \ref position access to positions). Don't delete positions created by this function manually, as the item will take care of it. U

Source from the content-addressed store, hash-verified

13188 \see createAnchor
13189*/
13190QCPItemPosition *QCPAbstractItem::createPosition(const QString &name)
13191{
13192 if (hasAnchor(name))
13193 qDebug() << Q_FUNC_INFO << "anchor/position with name exists already:" << name;
13194 QCPItemPosition *newPosition = new QCPItemPosition(mParentPlot, this, name);
13195 mPositions.append(newPosition);
13196 mAnchors.append(newPosition); // every position is also an anchor
13197 newPosition->setAxes(mParentPlot->xAxis, mParentPlot->yAxis);
13198 newPosition->setType(QCPItemPosition::ptPlotCoords);
13199 if (mParentPlot->axisRect())
13200 newPosition->setAxisRect(mParentPlot->axisRect());
13201 newPosition->setCoords(0, 0);
13202 return newPosition;
13203}
13204
13205/*! \internal
13206

Callers

nothing calls this directly

Calls 6

appendMethod · 0.80
setAxesMethod · 0.80
setTypeMethod · 0.80
axisRectMethod · 0.80
setAxisRectMethod · 0.80
setCoordsMethod · 0.80

Tested by

no test coverage detected