def __loadDiagram(self): """ Private slot to load a diagram from file. """ from Graphics.UMLDialog import UMLDialog self.loadedDiagram = None loadedDiagram = UMLDialog(UMLDialog.NoDiagram, self.project, parent=self) if loadedDiagram.load(): self.loadedDiagram = loadedDiagram self.loadedDiagram.show(fromFile=True)
def __showApplicationDiagram(self): """ Private method to handle the application diagram context menu action. """ res = E5MessageBox.yesNo(self, self.tr("Application Diagram"), self.tr("""Include module names?"""), yesDefault=True) from Graphics.UMLDialog import UMLDialog self.applicationDiagram = UMLDialog(UMLDialog.ApplicationDiagram, self.project, self, noModules=not res) self.applicationDiagram.show()
def __showImportsDiagram(self): """ Private method to handle the imports diagram context menu action. """ itm = self.model().item(self.currentIndex()) try: fn = itm.fileName() except AttributeError: fn = itm.dirName() package = os.path.isdir(fn) and fn or os.path.dirname(fn) res = E5MessageBox.yesNo( self, self.tr("Imports Diagram"), self.tr("""Include imports from external modules?""")) from Graphics.UMLDialog import UMLDialog self.importsDiagram = UMLDialog(UMLDialog.ImportsDiagram, self.project, package, self, showExternalImports=res) self.importsDiagram.show()
def __showClassDiagram(self): """ Private method to handle the class diagram context menu action. """ itm = self.model().item(self.currentIndex()) try: fn = itm.fileName() except AttributeError: fn = itm.dirName() res = E5MessageBox.yesNo(self, self.tr("Class Diagram"), self.tr("""Include class attributes?"""), yesDefault=True) from Graphics.UMLDialog import UMLDialog self.classDiagram = UMLDialog(UMLDialog.ClassDiagram, self.project, fn, self, noAttrs=not res) self.classDiagram.show()