MCPcopy Create free account
hub / github.com/LUX-Core/lux / adoptElement

Method adoptElement

src/qt/qcustomplot.cpp:3799–3811  ·  view source on GitHub ↗

! \internal Associates \a el with this layout. This is done by setting the \ref QCPLayoutElement::layout, the \ref QCPLayerable::parentLayerable and the QObject parent to this layout. Further, if \a el didn't previously have a parent plot, calls \ref QCPLayerable::initializeParentPlot on \a el to set the paret plot. This method is used by subclass specific methods that add eleme

Source from the content-addressed store, hash-verified

3797 the new layout must be done additionally.
3798*/
3799void QCPLayout::adoptElement(QCPLayoutElement *el)
3800{
3801 if (el)
3802 {
3803 el->mParentLayout = this;
3804 el->setParentLayerable(this);
3805 el->setParent(this);
3806 if (!el->parentPlot())
3807 el->initializeParentPlot(mParentPlot);
3808 el->layoutChanged();
3809 } else
3810 qDebug() << Q_FUNC_INFO << "Null element passed";
3811}
3812
3813/*! \internal
3814

Callers

nothing calls this directly

Calls 3

setParentLayerableMethod · 0.80
initializeParentPlotMethod · 0.80
layoutChangedMethod · 0.80

Tested by

no test coverage detected