51 |
51 |
52 self.__createPopupMenu() |
52 self.__createPopupMenu() |
53 self.setContextMenuPolicy(Qt.CustomContextMenu) |
53 self.setContextMenuPolicy(Qt.CustomContextMenu) |
54 self.customContextMenuRequested.connect(self.__contextMenuRequested) |
54 self.customContextMenuRequested.connect(self.__contextMenuRequested) |
55 self.itemActivated.connect(self.__openItem) |
55 self.itemActivated.connect(self.__openItem) |
|
56 |
|
57 self.setEnabled(False) |
56 |
58 |
57 ########################################################################### |
59 ########################################################################### |
58 ## Slot handling methods below |
60 ## Slot handling methods below |
59 ########################################################################### |
61 ########################################################################### |
60 |
62 |
61 def __newMultiProject(self): |
63 def __newMultiProject(self): |
62 """ |
64 """ |
63 Private slot to handle the creation of a new multi project. |
65 Private slot to handle the creation of a new multi project. |
64 """ |
66 """ |
65 self.clear() |
67 self.clear() |
|
68 self.setEnabled(True) |
66 |
69 |
67 def __multiProjectOpened(self): |
70 def __multiProjectOpened(self): |
68 """ |
71 """ |
69 Private slot to handle the opening of a multi project. |
72 Private slot to handle the opening of a multi project. |
70 """ |
73 """ |
71 for project in self.multiProject.getProjects(): |
74 for project in self.multiProject.getProjects(): |
72 self.__addProject(project) |
75 self.__addProject(project) |
73 |
76 |
74 self.sortItems() |
77 self.sortItems() |
|
78 |
|
79 self.setEnabled(True) |
75 |
80 |
76 def __multiProjectClosed(self): |
81 def __multiProjectClosed(self): |
77 """ |
82 """ |
78 Private slot to handle the closing of a multi project. |
83 Private slot to handle the closing of a multi project. |
79 """ |
84 """ |
80 self.clear() |
85 self.clear() |
|
86 self.setEnabled(False) |
81 |
87 |
82 def __projectAdded(self, project): |
88 def __projectAdded(self, project): |
83 """ |
89 """ |
84 Private slot to handle the addition of a project to the multi project. |
90 Private slot to handle the addition of a project to the multi project. |
85 |
91 |