! \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
| 3829 | the new layout must be done additionally. |
| 3830 | */ |
| 3831 | void QCPLayout::adoptElement(QCPLayoutElement *el) |
| 3832 | { |
| 3833 | if (el) |
| 3834 | { |
| 3835 | el->mParentLayout = this; |
| 3836 | el->setParentLayerable(this); |
| 3837 | el->setParent(this); |
| 3838 | if (!el->parentPlot()) |
| 3839 | el->initializeParentPlot(mParentPlot); |
| 3840 | el->layoutChanged(); |
| 3841 | } else |
| 3842 | qDebug() << Q_FUNC_INFO << "Null element passed"; |
| 3843 | } |
| 3844 | |
| 3845 | /*! \internal |
| 3846 |
nothing calls this directly
no test coverage detected