eric6/QScintilla/Editor.py

changeset 8276
1436fd09d1e1
parent 8259
2bbec88047dd
child 8277
ea734702ae94
equal deleted inserted replaced
8275:2f4b8212a151 8276:1436fd09d1e1
7554 7554
7555 def __showClassDiagram(self): 7555 def __showClassDiagram(self):
7556 """ 7556 """
7557 Private method to handle the Class Diagram context menu action. 7557 Private method to handle the Class Diagram context menu action.
7558 """ 7558 """
7559 from Graphics.UMLDialog import UMLDialog 7559 from Graphics.UMLDialog import UMLDialog, UMLDialogType
7560 if not self.checkDirty(): 7560 if not self.checkDirty():
7561 return 7561 return
7562 7562
7563 self.classDiagram = UMLDialog( 7563 self.classDiagram = UMLDialog(
7564 UMLDialog.ClassDiagram, self.project, self.fileName, 7564 UMLDialogType.CLASS_DIAGRAM, self.project, self.fileName,
7565 self, noAttrs=False) 7565 self, noAttrs=False)
7566 self.classDiagram.show() 7566 self.classDiagram.show()
7567 7567
7568 def __showPackageDiagram(self): 7568 def __showPackageDiagram(self):
7569 """ 7569 """
7570 Private method to handle the Package Diagram context menu action. 7570 Private method to handle the Package Diagram context menu action.
7571 """ 7571 """
7572 from Graphics.UMLDialog import UMLDialog 7572 from Graphics.UMLDialog import UMLDialog, UMLDialogType
7573 if not self.checkDirty(): 7573 if not self.checkDirty():
7574 return 7574 return
7575 7575
7576 package = ( 7576 package = (
7577 os.path.isdir(self.fileName) and 7577 os.path.isdir(self.fileName) and
7581 self, 7581 self,
7582 self.tr("Package Diagram"), 7582 self.tr("Package Diagram"),
7583 self.tr("""Include class attributes?"""), 7583 self.tr("""Include class attributes?"""),
7584 yesDefault=True) 7584 yesDefault=True)
7585 self.packageDiagram = UMLDialog( 7585 self.packageDiagram = UMLDialog(
7586 UMLDialog.PackageDiagram, self.project, package, 7586 UMLDialogType.PACKAGE_DIAGRAM, self.project, package,
7587 self, noAttrs=not res) 7587 self, noAttrs=not res)
7588 self.packageDiagram.show() 7588 self.packageDiagram.show()
7589 7589
7590 def __showImportsDiagram(self): 7590 def __showImportsDiagram(self):
7591 """ 7591 """
7592 Private method to handle the Imports Diagram context menu action. 7592 Private method to handle the Imports Diagram context menu action.
7593 """ 7593 """
7594 from Graphics.UMLDialog import UMLDialog 7594 from Graphics.UMLDialog import UMLDialog, UMLDialogType
7595 if not self.checkDirty(): 7595 if not self.checkDirty():
7596 return 7596 return
7597 7597
7598 package = ( 7598 package = (
7599 os.path.isdir(self.fileName) and 7599 os.path.isdir(self.fileName) and
7602 res = E5MessageBox.yesNo( 7602 res = E5MessageBox.yesNo(
7603 self, 7603 self,
7604 self.tr("Imports Diagram"), 7604 self.tr("Imports Diagram"),
7605 self.tr("""Include imports from external modules?""")) 7605 self.tr("""Include imports from external modules?"""))
7606 self.importsDiagram = UMLDialog( 7606 self.importsDiagram = UMLDialog(
7607 UMLDialog.ImportsDiagram, self.project, package, 7607 UMLDialogType.IMPORTS_DIAGRAM, self.project, package,
7608 self, showExternalImports=res) 7608 self, showExternalImports=res)
7609 self.importsDiagram.show() 7609 self.importsDiagram.show()
7610 7610
7611 def __showApplicationDiagram(self): 7611 def __showApplicationDiagram(self):
7612 """ 7612 """
7613 Private method to handle the Imports Diagram context menu action. 7613 Private method to handle the Imports Diagram context menu action.
7614 """ 7614 """
7615 from Graphics.UMLDialog import UMLDialog 7615 from Graphics.UMLDialog import UMLDialog, UMLDialogType
7616 res = E5MessageBox.yesNo( 7616 res = E5MessageBox.yesNo(
7617 self, 7617 self,
7618 self.tr("Application Diagram"), 7618 self.tr("Application Diagram"),
7619 self.tr("""Include module names?"""), 7619 self.tr("""Include module names?"""),
7620 yesDefault=True) 7620 yesDefault=True)
7621 self.applicationDiagram = UMLDialog( 7621 self.applicationDiagram = UMLDialog(
7622 UMLDialog.ApplicationDiagram, self.project, 7622 UMLDialogType.APPLICATION_DIAGRAM, self.project,
7623 self, noModules=not res) 7623 self, noModules=not res)
7624 self.applicationDiagram.show() 7624 self.applicationDiagram.show()
7625 7625
7626 def __loadDiagram(self): 7626 def __loadDiagram(self):
7627 """ 7627 """
7628 Private slot to load a diagram from file. 7628 Private slot to load a diagram from file.
7629 """ 7629 """
7630 from Graphics.UMLDialog import UMLDialog 7630 from Graphics.UMLDialog import UMLDialog, UMLDialogType
7631 self.loadedDiagram = UMLDialog( 7631 self.loadedDiagram = UMLDialog(
7632 UMLDialog.NoDiagram, self.project, parent=self) 7632 UMLDialogType.NO_DIAGRAM, self.project, parent=self)
7633 if self.loadedDiagram.load(): 7633 if self.loadedDiagram.load():
7634 self.loadedDiagram.show(fromFile=True) 7634 self.loadedDiagram.show(fromFile=True)
7635 else: 7635 else:
7636 self.loadedDiagram = None 7636 self.loadedDiagram = None
7637 7637

eric ide

mercurial