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

Method setRoot

src/backend/core/AspectTreeModel.cpp:61–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61void AspectTreeModel::setRoot(AbstractAspect* root) {
62 if (m_root)
63 disconnect(m_root, nullptr, this, nullptr);
64
65 m_root = root;
66 connect(m_root, &AbstractAspect::renameRequested, this, &AspectTreeModel::renameRequestedSlot);
67 connect(m_root, &AbstractAspect::aspectDescriptionChanged, this, &AspectTreeModel::aspectDescriptionChanged);
68 connect(m_root,
69 QOverload<const AbstractAspect*, const AbstractAspect*, const AbstractAspect*>::of(&AbstractAspect::childAspectAboutToBeAdded),
70 this,
71 QOverload<const AbstractAspect*, const AbstractAspect*, const AbstractAspect*>::of(&AspectTreeModel::aspectAboutToBeAdded));
72 connect(m_root, &AbstractAspect::childAspectAboutToBeRemoved, this, &AspectTreeModel::aspectAboutToBeRemoved);
73 connect(m_root, &AbstractAspect::childAspectAdded, this, &AspectTreeModel::aspectAdded);
74 connect(m_root, &AbstractAspect::childAspectRemoved, this, &AspectTreeModel::aspectRemoved);
75 connect(m_root, &AbstractAspect::aspectHiddenAboutToChange, this, &AspectTreeModel::aspectHiddenAboutToChange);
76 connect(m_root, &AbstractAspect::aspectHiddenChanged, this, &AspectTreeModel::aspectHiddenChanged);
77 connect(m_root, &AbstractAspect::childAspectAboutToBeMoved, this, &AspectTreeModel::aspectAboutToBeMoved);
78 connect(m_root, &AbstractAspect::childAspectMoved, this, &AspectTreeModel::aspectMoved);
79}
80
81/*!
82 \c list contains the class names of the aspects, that can be selected in the corresponding model view.

Callers 1

setCurvesMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected