Project/ProjectBrowserModel.py

changeset 2763
e4794166ad70
parent 2613
0799eea6feba
child 2769
8cbebde7a984
equal deleted inserted replaced
2761:bcc10ef7015d 2763:e4794166ad70
433 self.inRefresh = False 433 self.inRefresh = False
434 self.reset() 434 self.reset()
435 435
436 def findParentItemByName(self, type_, name, dontSplit=False): 436 def findParentItemByName(self, type_, name, dontSplit=False):
437 """ 437 """
438 Public method to find an item given it's name. 438 Public method to find an item given its name.
439 439
440 <b>Note</b>: This method creates all necessary parent items, if they 440 <b>Note</b>: This method creates all necessary parent items, if they
441 don't exist. 441 don't exist.
442 442
443 @param type_ type of the item 443 @param type_ type of the item
552 self.dataChanged.emit(index, index) 552 self.dataChanged.emit(index, index)
553 self.repopulateItem(newFilename) 553 self.repopulateItem(newFilename)
554 554
555 def findItem(self, name): 555 def findItem(self, name):
556 """ 556 """
557 Public method to find an item given it's name. 557 Public method to find an item given its name.
558 558
559 @param name name of the item (string) 559 @param name name of the item (string)
560 @return reference to the item found 560 @return reference to the item found
561 """ 561 """
562 if QDir.isAbsolutePath(name): 562 if QDir.isAbsolutePath(name):
573 else: 573 else:
574 return None 574 return None
575 575
576 def itemIndexByName(self, name): 576 def itemIndexByName(self, name):
577 """ 577 """
578 Public method to find an item's index given it's name. 578 Public method to find an item's index given its name.
579 579
580 @param name name of the item (string) 580 @param name name of the item (string)
581 @return index of the item found (QModelIndex) 581 @return index of the item found (QModelIndex)
582 """ 582 """
583 itm = self.findItem(name) 583 itm = self.findItem(name)

eric ide

mercurial