17 from .PackageItem import PackageItem, PackageModel |
17 from .PackageItem import PackageItem, PackageModel |
18 from .AssociationItem import AssociationItem, Imports |
18 from .AssociationItem import AssociationItem, Imports |
19 |
19 |
20 import Utilities.ModuleParser |
20 import Utilities.ModuleParser |
21 import Utilities |
21 import Utilities |
|
22 |
22 |
23 |
23 class ApplicationDiagram(UMLDialog): |
24 class ApplicationDiagram(UMLDialog): |
24 """ |
25 """ |
25 Class implementing a dialog showing an imports diagram of the application. |
26 Class implementing a dialog showing an imports diagram of the application. |
26 """ |
27 """ |
27 def __init__(self, project, parent = None, name = None, noModules = False): |
28 def __init__(self, project, parent=None, name=None, noModules=False): |
28 """ |
29 """ |
29 Constructor |
30 Constructor |
30 |
31 |
31 @param project reference to the project object |
32 @param project reference to the project object |
32 @param parent parent widget of the view (QWidget) |
33 @param parent parent widget of the view (QWidget) |
33 @param name name of the view widget (string) |
34 @param name name of the view widget (string) |
34 @keyparam noModules flag indicating, that no module names should be |
35 @keyparam noModules flag indicating, that no module names should be |
35 shown (boolean) |
36 shown (boolean) |
36 """ |
37 """ |
37 self.project = project |
38 self.project = project |
38 self.noModules = noModules |
39 self.noModules = noModules |
39 |
40 |
218 @param x x-coordinate (float) |
219 @param x x-coordinate (float) |
219 @param y y-coordinate (float) |
220 @param y y-coordinate (float) |
220 """ |
221 """ |
221 modules.sort() |
222 modules.sort() |
222 pm = PackageModel(name, modules) |
223 pm = PackageModel(name, modules) |
223 pw = PackageItem(pm, x, y, noModules = self.noModules, scene = self.scene) |
224 pw = PackageItem(pm, x, y, noModules=self.noModules, scene=self.scene) |
224 return pw |
225 return pw |
225 |
226 |
226 def __createAssociations(self, shapes): |
227 def __createAssociations(self, shapes): |
227 """ |
228 """ |
228 Private method to generate the associations between the package shapes. |
229 Private method to generate the associations between the package shapes. |