예제 #1
0
파일: tree.py 프로젝트: bmartins95/TagApp
 def addTree(self, id: int):
     """Takes the projectId searchs for the project name on the server, then
     the function creates a QtWidgets.QTreeWidgetItem using the project name
     and defines this item as an class top level item.
     """
     server = Server()
     name = server.getProjectName(id)
     self.projectIds[name] = id
     self.trees[name] = QtWidgets.QTreeWidgetItem([name])
     self.addTopLevelItem(self.trees[name])
예제 #2
0
파일: tree.py 프로젝트: bmartins95/TagApp
 def addBranches(self, id: int):
     """Searches for all the lists in the server that have id as their 
     projectId. Creates a QTreeWidgetItem for each list and add the item into
     the top level QTreeWidgetItem.
     """
     server = Server()
     name = server.getProjectName(id)
     branches = server.getListsNameFromProject(id)
     self.listsOpen[name] = branches
     for branch in branches:
         item = QtWidgets.QTreeWidgetItem(branch)
         self.trees[name].addChild(item)
     self.trees[name].setExpanded(True)