Esempio n. 1
0
 def getCategoryWithIndex(self, index):
     children = self.__categories.rootItems()
     for i in index:
         category = children[i]
         children = [child for child in category.children() \
                     if child in self.__categories]
     return category
Esempio n. 2
0
 def getChildrenCount(self, index): # FIXME: duplication with viewers
     if index == ():
         return len(self.__categories.rootItems())
     else:
         category = self.getCategoryWithIndex(index)
         return len(category.children())