Beispiel #1
0
 def restoreCategoryLinks(self, categoryMap):
     categories = self.categories()
     for categoryId, categorizables in categoryMap.iteritems():
         category = categories.getObjectById(categoryId)
         for categorizable in categorizables:
             categorizable.addCategory(category)
             category.addCategorizable(categorizable)
Beispiel #2
0
 def restoreCategoryLinks(self, categoryMap):
     categories = self.categories()
     for categoryId, categorizables in categoryMap.iteritems():
         category = categories.getObjectById(categoryId)
         for categorizable in categorizables:
             categorizable.addCategory(category)
             category.addCategorizable(categorizable)
Beispiel #3
0
 def ok(self):
     self._treeCtrl.ExpandAll()
     for item in self._treeCtrl.GetItemChildren(recursively=True):
         index = self._treeCtrl.GetIndexOfItem(item)
         category = self.getCategoryWithIndex(index)
         if item.IsChecked():
             category.addCategorizable(self._note)
             self._note.addCategory(category)
         else:
             category.removeCategorizable(self._note)
             self._note.removeCategory(category)
Beispiel #4
0
 def ok(self):
     treeCtrl = self._categoryViewer.widget
     treeCtrl.ExpandAll()
     for categoryNode in treeCtrl.GetItemChildren(recursively=True):
         categoryIndex = treeCtrl.GetIndexOfItem(categoryNode)
         category = self._categoryViewer.getItemWithIndex(categoryIndex)
         if categoryNode.IsChecked():
             category.addCategorizable(self.item)
             self.item.addCategory(category)
         else:
             category.removeCategorizable(self.item)
             self.item.removeCategory(category)
Beispiel #5
0
 def link(self, category, categorizable):
     category.addCategorizable(categorizable)
     categorizable.addCategory(category)
 def link(self, category, categorizable):  # pylint: disable=W0621
     category.addCategorizable(categorizable)
     categorizable.addCategory(category)
 def link(self, category, categorizable): # pylint: disable=W0621
     category.addCategorizable(categorizable)
     categorizable.addCategory(category)