! \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
| 3797 | the new layout must be done additionally. |
| 3798 | */ |
| 3799 | void 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 |
nothing calls this directly
no test coverage detected