Graphics/UMLClassDiagram.py

changeset 2026
18f2b30ed046
parent 2025
8bb085c59cd2
child 2027
144463496a54
equal deleted inserted replaced
2025:8bb085c59cd2 2026:18f2b30ed046
32 @param file filename of a python module to be shown (string) 32 @param file filename of a python module to be shown (string)
33 @param parent parent widget of the view (QWidget) 33 @param parent parent widget of the view (QWidget)
34 @param name name of the view widget (string) 34 @param name name of the view widget (string)
35 @keyparam noAttrs flag indicating, that no attributes should be shown (boolean) 35 @keyparam noAttrs flag indicating, that no attributes should be shown (boolean)
36 """ 36 """
37 UMLDialog.__init__(self, parent=parent)
38
37 self.file = file 39 self.file = file
38 self.noAttrs = noAttrs 40 self.noAttrs = noAttrs
39 41
40 pname = project.getProjectName() 42 pname = project.getProjectName()
41 if pname and project.isProjectSource(self.file): 43 if pname and project.isProjectSource(self.file):
42 name = "{0}: {1}".format(pname, project.getRelativePath(self.file)) 44 name = self.trUtf8("Class Diagram {0}: {1}").format(
45 pname, project.getRelativePath(self.file))
43 else: 46 else:
44 name = self.file 47 name = self.trUtf8("Class Diagram: {0}").format(self.file)
45 UMLDialog.__init__(self, name, parent) 48 self.setDiagramName(name)
46 49
47 if not name: 50 if not name:
48 self.setObjectName("UMLClassDiagram") 51 self.setObjectName("UMLClassDiagram")
49 else: 52 else:
50 self.setObjectName(name) 53 self.setObjectName(name)

eric ide

mercurial