Beispiel #1
0
 def _load_notebooks(self, parent_node, parent_id):
     child_notebooks = Notebook.select().where(
         Notebook.parent_id == parent_id)
     for notebook in child_notebooks:
         item = self.AppendItem(parent_node, notebook.name, data=notebook)
         self._load_notebooks(item, notebook.id)
     self.ExpandAll()
Beispiel #2
0
 def _build_note_tree(self, parent_id, parent_item):
     child_notebooks = Notebook.select().where(
         Notebook.parent_id == parent_id)
     for note_book in child_notebooks:
         item = self.AppendItem(parent_item,
                                '',
                                data=self.get_notebook_info(note_book))
         self.set_item_text(item)
         self.tree_node_dict[note_book.id] = item
         self._build_note_tree(note_book.id, item)