void AGOSEngine::setItemParent(Item *item, Item *parent) { Item *old_parent = derefItem(item->parent); if (item == parent) error("setItemParent: Trying to set item as its own parent"); // unlink it if it has a parent if (old_parent) unlinkItem(item); itemChildrenChanged(old_parent); linkItem(item, parent); itemChildrenChanged(parent); }
void AGOSEngine::xPlace(Item *x, Item *y) { if (derefItem(x->parent)) unlinkItem(x); linkItem(x, y); }
void HotSpotList::remove(HotSpot *hotspot) { unlinkItem(hotspot); delete hotspot; //TODO: check this? }