MCPcopy Create free account
hub / github.com/CieNTi/serial_port_plotter / addChild

Method addChild

qcustomplot/qcustomplot.cpp:1198–1210  ·  view source on GitHub ↗

! \internal Adds the \a layerable to the list of this layer. If \a prepend is set to true, the layerable will be prepended to the list, i.e. be drawn beneath the other layerables already in the list. This function does not change the \a mLayer member of \a layerable to this layer. (Use QCPLayerable::setLayer to change the layer of an object, not this function.) \see removeChild

Source from the content-addressed store, hash-verified

1196 \see removeChild
1197*/
1198void QCPLayer::addChild(QCPLayerable *layerable, bool prepend)
1199{
1200 if (!mChildren.contains(layerable))
1201 {
1202 if (prepend)
1203 mChildren.prepend(layerable);
1204 else
1205 mChildren.append(layerable);
1206 if (!mPaintBuffer.isNull())
1207 mPaintBuffer.data()->setInvalidated();
1208 } else
1209 qDebug() << Q_FUNC_INFO << "layerable is already child of this layer" << reinterpret_cast<quintptr>(layerable);
1210}
1211
1212/*! \internal
1213

Callers 2

moveToLayerMethod · 0.80
setMarginGroupMethod · 0.80

Calls 4

containsMethod · 0.80
appendMethod · 0.80
setInvalidatedMethod · 0.80
dataMethod · 0.80

Tested by

no test coverage detected