Graphics/PackageDiagram.py

changeset 2025
8bb085c59cd2
parent 2024
717b72b32420
child 2026
18f2b30ed046
equal deleted inserted replaced
2024:717b72b32420 2025:8bb085c59cd2
25 25
26 class PackageDiagram(UMLDialog): 26 class PackageDiagram(UMLDialog):
27 """ 27 """
28 Class implementing a dialog showing a UML like class diagram of a package. 28 Class implementing a dialog showing a UML like class diagram of a package.
29 """ 29 """
30 def __init__(self, package, parent=None, name=None, noAttrs=False): 30 def __init__(self, project, package, parent=None, name=None, noAttrs=False):
31 """ 31 """
32 Constructor 32 Constructor
33 33
34 @param project reference to the project object
34 @param package name of a python package to be shown (string) 35 @param package name of a python package to be shown (string)
35 @param parent parent widget of the view (QWidget) 36 @param parent parent widget of the view (QWidget)
36 @param name name of the view widget (string) 37 @param name name of the view widget (string)
37 @keyparam noAttrs flag indicating, that no attributes should be shown (boolean) 38 @keyparam noAttrs flag indicating, that no attributes should be shown (boolean)
38 """ 39 """
39 self.package = Utilities.normabspath(package) 40 self.package = Utilities.normabspath(package)
40 self.allClasses = {} 41 self.allClasses = {}
41 self.noAttrs = noAttrs 42 self.noAttrs = noAttrs
42 43
43 UMLDialog.__init__(self, self.package, parent) 44 pname = project.getProjectName()
45 if pname:
46 name = "{0}: {1}".format(pname, project.getRelativePath(self.package))
47 else:
48 name = self.package
49 UMLDialog.__init__(self, name, parent)
44 50
45 if not name: 51 if not name:
46 self.setObjectName("PackageDiagram") 52 self.setObjectName("PackageDiagram")
47 else: 53 else:
48 self.setObjectName(name) 54 self.setObjectName(name)

eric ide

mercurial