20 |
20 |
21 from DataViews.CodeMetricsDialog import CodeMetricsDialog |
21 from DataViews.CodeMetricsDialog import CodeMetricsDialog |
22 from DataViews.PyCoverageDialog import PyCoverageDialog |
22 from DataViews.PyCoverageDialog import PyCoverageDialog |
23 from DataViews.PyProfileDialog import PyProfileDialog |
23 from DataViews.PyProfileDialog import PyProfileDialog |
24 |
24 |
25 from Graphics.UMLClassDiagram import UMLClassDiagram |
25 from Graphics.UMLDialog import UMLDialog |
26 from Graphics.ImportsDiagram import ImportsDiagram |
|
27 from Graphics.ApplicationDiagram import ApplicationDiagram |
|
28 from Graphics.PackageDiagram import PackageDiagram |
|
29 |
26 |
30 from .ProjectBrowserModel import ProjectBrowserFileItem, \ |
27 from .ProjectBrowserModel import ProjectBrowserFileItem, \ |
31 ProjectBrowserSimpleDirectoryItem, ProjectBrowserDirectoryItem, \ |
28 ProjectBrowserSimpleDirectoryItem, ProjectBrowserDirectoryItem, \ |
32 ProjectBrowserSourceType |
29 ProjectBrowserSourceType |
33 from .ProjectBaseBrowser import ProjectBaseBrowser |
30 from .ProjectBaseBrowser import ProjectBaseBrowser |
859 fn = itm.dirName() |
856 fn = itm.dirName() |
860 res = E5MessageBox.yesNo(self, |
857 res = E5MessageBox.yesNo(self, |
861 self.trUtf8("Class Diagram"), |
858 self.trUtf8("Class Diagram"), |
862 self.trUtf8("""Include class attributes?"""), |
859 self.trUtf8("""Include class attributes?"""), |
863 yesDefault=True) |
860 yesDefault=True) |
864 self.classDiagram = UMLClassDiagram(self.project, fn, self, noAttrs=not res) |
861 self.classDiagram = UMLDialog(UMLDialog.ClassDiagram, self.project, fn, |
|
862 self, noAttrs=not res) |
865 self.classDiagram.show() |
863 self.classDiagram.show() |
866 |
864 |
867 def __showImportsDiagram(self): |
865 def __showImportsDiagram(self): |
868 """ |
866 """ |
869 Private method to handle the imports diagram context menu action. |
867 Private method to handle the imports diagram context menu action. |
875 fn = itm.dirName() |
873 fn = itm.dirName() |
876 package = os.path.isdir(fn) and fn or os.path.dirname(fn) |
874 package = os.path.isdir(fn) and fn or os.path.dirname(fn) |
877 res = E5MessageBox.yesNo(self, |
875 res = E5MessageBox.yesNo(self, |
878 self.trUtf8("Imports Diagram"), |
876 self.trUtf8("Imports Diagram"), |
879 self.trUtf8("""Include imports from external modules?""")) |
877 self.trUtf8("""Include imports from external modules?""")) |
880 self.importsDiagram = ImportsDiagram(self.project, package, self, |
878 self.importsDiagram = UMLDialog(UMLDialog.ImportsDiagram, self.project, package, |
881 showExternalImports=res) |
879 self, showExternalImports=res) |
882 self.importsDiagram.show() |
880 self.importsDiagram.show() |
883 |
881 |
884 def __showPackageDiagram(self): |
882 def __showPackageDiagram(self): |
885 """ |
883 """ |
886 Private method to handle the package diagram context menu action. |
884 Private method to handle the package diagram context menu action. |
893 package = os.path.isdir(fn) and fn or os.path.dirname(fn) |
891 package = os.path.isdir(fn) and fn or os.path.dirname(fn) |
894 res = E5MessageBox.yesNo(self, |
892 res = E5MessageBox.yesNo(self, |
895 self.trUtf8("Package Diagram"), |
893 self.trUtf8("Package Diagram"), |
896 self.trUtf8("""Include class attributes?"""), |
894 self.trUtf8("""Include class attributes?"""), |
897 yesDefault=True) |
895 yesDefault=True) |
898 self.packageDiagram = PackageDiagram(self.project, package, self, noAttrs=not res) |
896 self.packageDiagram = UMLDialog(UMLDialog.PackageDiagram, self.project, package, |
|
897 self, noAttrs=not res) |
899 self.packageDiagram.show() |
898 self.packageDiagram.show() |
900 |
899 |
901 def __showApplicationDiagram(self): |
900 def __showApplicationDiagram(self): |
902 """ |
901 """ |
903 Private method to handle the application diagram context menu action. |
902 Private method to handle the application diagram context menu action. |
904 """ |
903 """ |
905 res = E5MessageBox.yesNo(self, |
904 res = E5MessageBox.yesNo(self, |
906 self.trUtf8("Application Diagram"), |
905 self.trUtf8("Application Diagram"), |
907 self.trUtf8("""Include module names?"""), |
906 self.trUtf8("""Include module names?"""), |
908 yesDefault=True) |
907 yesDefault=True) |
909 self.applicationDiagram = ApplicationDiagram(self.project, self, |
908 self.applicationDiagram = UMLDialog(UMLDialog.ApplicationDiagram, self.project, |
910 noModules=not res) |
909 self, noModules=not res) |
911 self.applicationDiagram.show() |
910 self.applicationDiagram.show() |