MultiProject/MultiProjectBrowser.py

changeset 3830
70831a7beb3f
parent 3656
441956d8fce5
child 4021
195a471c327b
equal deleted inserted replaced
3829:0c9b6013b063 3830:70831a7beb3f
57 57
58 self.__createPopupMenu() 58 self.__createPopupMenu()
59 self.setContextMenuPolicy(Qt.CustomContextMenu) 59 self.setContextMenuPolicy(Qt.CustomContextMenu)
60 self.customContextMenuRequested.connect(self.__contextMenuRequested) 60 self.customContextMenuRequested.connect(self.__contextMenuRequested)
61 self.itemActivated.connect(self.__openItem) 61 self.itemActivated.connect(self.__openItem)
62
63 self.setEnabled(False)
62 64
63 ########################################################################### 65 ###########################################################################
64 ## Slot handling methods below 66 ## Slot handling methods below
65 ########################################################################### 67 ###########################################################################
66 68
67 def __newMultiProject(self): 69 def __newMultiProject(self):
68 """ 70 """
69 Private slot to handle the creation of a new multi project. 71 Private slot to handle the creation of a new multi project.
70 """ 72 """
71 self.clear() 73 self.clear()
74 self.setEnabled(True)
72 75
73 def __multiProjectOpened(self): 76 def __multiProjectOpened(self):
74 """ 77 """
75 Private slot to handle the opening of a multi project. 78 Private slot to handle the opening of a multi project.
76 """ 79 """
77 for project in self.multiProject.getProjects(): 80 for project in self.multiProject.getProjects():
78 self.__addProject(project) 81 self.__addProject(project)
79 82
80 self.sortItems(0, Qt.AscendingOrder) 83 self.sortItems(0, Qt.AscendingOrder)
84
85 self.setEnabled(True)
81 86
82 def __multiProjectClosed(self): 87 def __multiProjectClosed(self):
83 """ 88 """
84 Private slot to handle the closing of a multi project. 89 Private slot to handle the closing of a multi project.
85 """ 90 """
86 self.clear() 91 self.clear()
92 self.setEnabled(False)
87 93
88 def __projectAdded(self, project): 94 def __projectAdded(self, project):
89 """ 95 """
90 Private slot to handle the addition of a project to the multi project. 96 Private slot to handle the addition of a project to the multi project.
91 97

eric ide

mercurial