MCPcopy Create free account
hub / github.com/KDE/labplot / addChild

Method addChild

src/backend/core/AbstractAspect.cpp:521–534  ·  view source on GitHub ↗

* \brief Add the given Aspect to my list of children. */

Source from the content-addressed store, hash-verified

519 * \brief Add the given Aspect to my list of children.
520 */
521bool AbstractAspect::addChild(AbstractAspect* child) {
522 Q_CHECK_PTR(child);
523
524 const QString new_name = uniqueNameFor(child->name());
525 beginMacro(i18n("%1: add %2", name(), new_name));
526 if (new_name != child->name()) {
527 info(i18n(R"(Renaming "%1" to "%2" in order to avoid name collision.)", child->name(), new_name));
528 child->setName(new_name);
529 }
530
531 exec(new AspectChildAddCmd(d, child, d->m_children.count()));
532 endMacro();
533 return true;
534}
535
536/**
537 * \brief Add the given Aspect to my list of children without any checks and without putting this step onto the undo-stack

Callers 15

mainFunction · 0.45
mainFunction · 0.45
newSpreadsheetMethod · 0.45
newMatrixMethod · 0.45
addAspectToProjectMethod · 0.45
PlotTemplateDialogMethod · 0.45
showPreviewMethod · 0.45
addTopicToTreeMethod · 0.45
importToMethod · 0.45

Calls 3

nameMethod · 0.45
setNameMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected