27 ImportsDiagram = 2 |
27 ImportsDiagram = 2 |
28 ApplicationDiagram = 3 |
28 ApplicationDiagram = 3 |
29 |
29 |
30 FileVersions = ["1.0"] |
30 FileVersions = ["1.0"] |
31 |
31 |
32 def __init__(self, diagramType, project, path="", parent=None, initBuilder=True, |
32 def __init__(self, diagramType, project, path="", parent=None, |
33 **kwargs): |
33 initBuilder=True, **kwargs): |
34 """ |
34 """ |
35 Constructor |
35 Constructor |
36 |
36 |
37 @param diagramType type of the diagram (one of ApplicationDiagram, ClassDiagram, |
37 @param diagramType type of the diagram (one of ApplicationDiagram, |
38 ImportsDiagram, NoDiagram, PackageDiagram) |
38 ClassDiagram, ImportsDiagram, NoDiagram, PackageDiagram) |
39 @param project reference to the project object (Project) |
39 @param project reference to the project object (Project) |
40 @param path file or directory path to build the diagram from (string) |
40 @param path file or directory path to build the diagram from (string) |
41 @param parent parent widget of the dialog (QWidget) |
41 @param parent parent widget of the dialog (QWidget) |
42 @keyparam initBuilder flag indicating to initialize the diagram builder (boolean) |
42 @keyparam initBuilder flag indicating to initialize the diagram |
43 @param kwargs diagram specific data |
43 builder (boolean) |
|
44 @keyparam kwargs diagram specific data |
44 """ |
45 """ |
45 super().__init__(parent) |
46 super().__init__(parent) |
46 self.setObjectName("UMLDialog") |
47 self.setObjectName("UMLDialog") |
47 |
48 |
48 self.__diagramType = diagramType |
49 self.__diagramType = diagramType |
153 Private method to instantiate a diagram builder object. |
154 Private method to instantiate a diagram builder object. |
154 |
155 |
155 @param diagramType type of the diagram |
156 @param diagramType type of the diagram |
156 (one of ApplicationDiagram, ClassDiagram, ImportsDiagram, PackageDiagram) |
157 (one of ApplicationDiagram, ClassDiagram, ImportsDiagram, PackageDiagram) |
157 @param path file or directory path to build the diagram from (string) |
158 @param path file or directory path to build the diagram from (string) |
158 @param kwargs diagram specific data |
159 @keyparam kwargs diagram specific data |
|
160 @return reference to the instantiated diagram builder |
|
161 @exception ValueError raised to indicate an illegal diagram type |
159 """ |
162 """ |
160 if diagramType == UMLDialog.ClassDiagram: |
163 if diagramType == UMLDialog.ClassDiagram: |
161 from .UMLClassDiagramBuilder import UMLClassDiagramBuilder |
164 from .UMLClassDiagramBuilder import UMLClassDiagramBuilder |
162 return UMLClassDiagramBuilder(self, self.umlView, self.__project, path, |
165 return UMLClassDiagramBuilder(self, self.umlView, self.__project, path, |
163 **kwargs) |
166 **kwargs) |