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