17Object::Object(Object *parent)
25 m_parent->removeChild(
this);
27 aboutToBeDeleted.emit();
29 const auto children = m_children;
30 for (Object *child : children) {
35void Object::setParent(Object *parent)
37 if (parent == m_parent)
41 m_parent->removeChild(
this);
46 parent->addChild(
this);
49Object *Object::parent()
const
54void Object::removeChild(Object *child)
56 auto it = std::find(m_children.begin(), m_children.end(), child);
57 if (it == m_children.cend()) {
58 KDDW_ERROR(
"Object::removeChild: Could not find child");
64void Object::addChild(Object *child)
66 m_children.push_back(child);
69QString Object::objectName()
const
74void Object::setObjectName(
const QString &name)
79QString Object::tr(
const char *text)