231 |
231 |
232 self.codemetrics = None |
232 self.codemetrics = None |
233 self.codecoverage = None |
233 self.codecoverage = None |
234 self.profiledata = None |
234 self.profiledata = None |
235 self.applicationDiagram = None |
235 self.applicationDiagram = None |
|
236 self.loadedDiagram = None |
236 |
237 |
237 def __initProjectTypes(self): |
238 def __initProjectTypes(self): |
238 """ |
239 """ |
239 Private method to initialize the list of supported project types. |
240 Private method to initialize the list of supported project types. |
240 """ |
241 """ |
2492 """ |
2493 """ |
2493 self.codemetrics and self.codemetrics.close() |
2494 self.codemetrics and self.codemetrics.close() |
2494 self.codecoverage and self.codecoverage.close() |
2495 self.codecoverage and self.codecoverage.close() |
2495 self.profiledata and self.profiledata.close() |
2496 self.profiledata and self.profiledata.close() |
2496 self.applicationDiagram and self.applicationDiagram.close() |
2497 self.applicationDiagram and self.applicationDiagram.close() |
|
2498 self.loadedDiagram and self.loadedDiagram.close() |
2497 |
2499 |
2498 def closeProject(self, reopen=False, noSave=False): |
2500 def closeProject(self, reopen=False, noSave=False): |
2499 """ |
2501 """ |
2500 Public slot to close the current project. |
2502 Public slot to close the current project. |
2501 |
2503 |
3249 """<p>This shows the profiling data for the project.</p>""" |
3251 """<p>This shows the profiling data for the project.</p>""" |
3250 )) |
3252 )) |
3251 self.codeProfileAct.triggered[()].connect(self.__showProfileData) |
3253 self.codeProfileAct.triggered[()].connect(self.__showProfileData) |
3252 self.actions.append(self.codeProfileAct) |
3254 self.actions.append(self.codeProfileAct) |
3253 |
3255 |
|
3256 self.graphicsGrp = createActionGroup(self) |
|
3257 |
3254 self.applicationDiagramAct = E5Action(self.trUtf8('Application Diagram'), |
3258 self.applicationDiagramAct = E5Action(self.trUtf8('Application Diagram'), |
3255 self.trUtf8('&Application Diagram...'), 0, 0, |
3259 self.trUtf8('&Application Diagram...'), 0, 0, |
3256 self.chkGrp, 'project_application_diagram') |
3260 self.graphicsGrp, 'project_application_diagram') |
3257 self.applicationDiagramAct.setStatusTip( |
3261 self.applicationDiagramAct.setStatusTip( |
3258 self.trUtf8('Show a diagram of the project.')) |
3262 self.trUtf8('Show a diagram of the project.')) |
3259 self.applicationDiagramAct.setWhatsThis(self.trUtf8( |
3263 self.applicationDiagramAct.setWhatsThis(self.trUtf8( |
3260 """<b>Application Diagram...</b>""" |
3264 """<b>Application Diagram...</b>""" |
3261 """<p>This shows a diagram of the project.</p>""" |
3265 """<p>This shows a diagram of the project.</p>""" |
3262 )) |
3266 )) |
3263 self.applicationDiagramAct.triggered[()].connect(self.handleApplicationDiagram) |
3267 self.applicationDiagramAct.triggered[()].connect(self.handleApplicationDiagram) |
3264 self.actions.append(self.applicationDiagramAct) |
3268 self.actions.append(self.applicationDiagramAct) |
|
3269 |
|
3270 self.loadDiagramAct = E5Action(self.trUtf8('Load Diagram'), |
|
3271 self.trUtf8('&Load Diagram...'), 0, 0, |
|
3272 self.graphicsGrp, 'project_load_diagram') |
|
3273 self.loadDiagramAct.setStatusTip( |
|
3274 self.trUtf8('Load a diagram from file.')) |
|
3275 self.loadDiagramAct.setWhatsThis(self.trUtf8( |
|
3276 """<b>Load Diagram...</b>""" |
|
3277 """<p>This loads a diagram from file.</p>""" |
|
3278 )) |
|
3279 self.loadDiagramAct.triggered[()].connect(self.__loadDiagram) |
|
3280 self.actions.append(self.loadDiagramAct) |
3265 |
3281 |
3266 self.pluginGrp = createActionGroup(self) |
3282 self.pluginGrp = createActionGroup(self) |
3267 |
3283 |
3268 self.pluginPkgListAct = E5Action(self.trUtf8('Create Package List'), |
3284 self.pluginPkgListAct = E5Action(self.trUtf8('Create Package List'), |
3269 UI.PixmapCache.getIcon("pluginArchiveList.png"), |
3285 UI.PixmapCache.getIcon("pluginArchiveList.png"), |
3376 self.menuShow.addAction(self.codeProfileAct) |
3392 self.menuShow.addAction(self.codeProfileAct) |
3377 |
3393 |
3378 # build the diagrams menu |
3394 # build the diagrams menu |
3379 self.graphicsMenu.setTearOffEnabled(True) |
3395 self.graphicsMenu.setTearOffEnabled(True) |
3380 self.graphicsMenu.addAction(self.applicationDiagramAct) |
3396 self.graphicsMenu.addAction(self.applicationDiagramAct) |
|
3397 self.graphicsMenu.addSeparator() |
|
3398 self.graphicsMenu.addAction(self.loadDiagramAct) |
3381 |
3399 |
3382 # build the session menu |
3400 # build the session menu |
3383 self.sessionMenu.setTearOffEnabled(True) |
3401 self.sessionMenu.setTearOffEnabled(True) |
3384 self.sessionMenu.addActions(self.sessActGrp.actions()) |
3402 self.sessionMenu.addActions(self.sessActGrp.actions()) |
3385 |
3403 |
3986 |
4004 |
3987 self.applicationDiagram = UMLDialog(UMLDialog.ApplicationDiagram, self, |
4005 self.applicationDiagram = UMLDialog(UMLDialog.ApplicationDiagram, self, |
3988 self.parent(), noModules=not res) |
4006 self.parent(), noModules=not res) |
3989 self.applicationDiagram.show() |
4007 self.applicationDiagram.show() |
3990 |
4008 |
|
4009 def __loadDiagram(self): |
|
4010 """ |
|
4011 Private slot to load a diagram from file. |
|
4012 """ |
|
4013 self.loadedDiagram = None |
|
4014 loadedDiagram = UMLDialog(UMLDialog.NoDiagram, self, parent=self.parent()) |
|
4015 if loadedDiagram.load(): |
|
4016 self.loadedDiagram = loadedDiagram |
|
4017 self.loadedDiagram.show(fromFile=True) |
|
4018 |
3991 ######################################################################### |
4019 ######################################################################### |
3992 ## Below is the interface to the VCS monitor thread |
4020 ## Below is the interface to the VCS monitor thread |
3993 ######################################################################### |
4021 ######################################################################### |
3994 |
4022 |
3995 def __statusMonitorStatus(self, status, statusMsg): |
4023 def __statusMonitorStatus(self, status, statusMsg): |