Internal implementation for deleting a reftrack.

        This will just delete the reftrack, set the children to None,
        update the status, and the rootobject. If the object is an alien,
        it will also set the parent to None, so it dissapears from the model.

        :returns: None
        :rtype: None
        :raises: None

def _delete(self, ):
        """Internal implementation for deleting a reftrack.

        This will just delete the reftrack, set the children to None,
        update the status, and the rootobject. If the object is an alien,
        it will also set the parent to None, so it dissapears from the model.

        :returns: None
        :rtype: None
        :raises: None
        """
        refobjinter = self.get_refobjinter()
        refobjinter.delete(self.get_refobj())
        self.set_refobj(None, setParent=False)
        if self.alien():
            # it should not be in the scene
            # so also remove it from the model
            # so we cannot load it again
            parent = self.get_parent()
            if parent:
                parent.remove_child(self)
            self._treeitem.parent().remove_child(self._treeitem)
        else:
            # only remove all children from the model and set their parent to None
            for c in self.get_all_children():
                c._parent = None
                self._treeitem.remove_child(c._treeitem)
        # this should not have any children anymore
        self._children = []
        self.set_status(None)