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

Method adoptElement

qcustomplot/qcustomplot.cpp:3805–3817  ·  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

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

Callers

nothing calls this directly

Calls 3

setParentLayerableMethod · 0.80
initializeParentPlotMethod · 0.80
layoutChangedMethod · 0.80

Tested by

no test coverage detected