Beispiel #1
0
    def GetChildren(self, parent, children):
        if not parent:
            ids = core_api.get_root_items(self.filename)
        else:
            pid = self.ItemToObject(parent).get_id()
            ids = core_api.get_item_children(self.filename, pid)

        for id_ in ids:
            children.append(self.ObjectToItem(self.data[id_]))

        return len(ids)
Beispiel #2
0
    def _reset_children(self, id_, item):
        childids = core_api.get_item_children(self.filename, id_)

        for childid in childids:
            child = self.get_tree_item(childid)
            self.dvmodel.ItemAdded(item, child)