39 self.setObjectName("ApplicationDiagram") |
39 self.setObjectName("ApplicationDiagram") |
40 |
40 |
41 self.noModules = noModules |
41 self.noModules = noModules |
42 |
42 |
43 self.umlView.setDiagramName( |
43 self.umlView.setDiagramName( |
44 self.trUtf8("Application Diagram {0}").format( |
44 self.tr("Application Diagram {0}").format( |
45 self.project.getProjectName())) |
45 self.project.getProjectName())) |
46 |
46 |
47 def __buildModulesDict(self): |
47 def __buildModulesDict(self): |
48 """ |
48 """ |
49 Private method to build a dictionary of modules contained in the |
49 Private method to build a dictionary of modules contained in the |
60 for module in mods: |
60 for module in mods: |
61 modules.append(Utilities.normabsjoinpath( |
61 modules.append(Utilities.normabsjoinpath( |
62 self.project.ppath, module)) |
62 self.project.ppath, module)) |
63 tot = len(modules) |
63 tot = len(modules) |
64 progress = E5ProgressDialog( |
64 progress = E5ProgressDialog( |
65 self.trUtf8("Parsing modules..."), |
65 self.tr("Parsing modules..."), |
66 None, 0, tot, self.trUtf8("%v/%m Modules"), self.parent()) |
66 None, 0, tot, self.tr("%v/%m Modules"), self.parent()) |
67 try: |
67 try: |
68 prog = 0 |
68 prog = 0 |
69 progress.show() |
69 progress.show() |
70 QApplication.processEvents() |
70 QApplication.processEvents() |
71 |
71 |
187 if package: |
187 if package: |
188 relPackage = package.replace(project, '') |
188 relPackage = package.replace(project, '') |
189 if relPackage and relPackage[0] == '.': |
189 if relPackage and relPackage[0] == '.': |
190 relPackage = relPackage[1:] |
190 relPackage = relPackage[1:] |
191 else: |
191 else: |
192 relPackage = self.trUtf8("<<Application>>") |
192 relPackage = self.tr("<<Application>>") |
193 else: |
193 else: |
194 relPackage = self.trUtf8("<<Others>>") |
194 relPackage = self.tr("<<Others>>") |
195 shape = self.__addPackage( |
195 shape = self.__addPackage( |
196 relPackage, packages[package][0], 0.0, 0.0) |
196 relPackage, packages[package][0], 0.0, 0.0) |
197 shapeRect = shape.sceneBoundingRect() |
197 shapeRect = shape.sceneBoundingRect() |
198 shapes[package] = (shape, packages[package][1]) |
198 shapes[package] = (shape, packages[package][1]) |
199 pn = p + shapeRect.width() + 10 |
199 pn = p + shapeRect.width() + 10 |
276 |
276 |
277 projectFile = parts[0].split("=", 1)[1].strip() |
277 projectFile = parts[0].split("=", 1)[1].strip() |
278 if projectFile != self.project.getProjectFile(): |
278 if projectFile != self.project.getProjectFile(): |
279 res = E5MessageBox.yesNo( |
279 res = E5MessageBox.yesNo( |
280 None, |
280 None, |
281 self.trUtf8("Load Diagram"), |
281 self.tr("Load Diagram"), |
282 self.trUtf8( |
282 self.tr( |
283 """<p>The diagram belongs to the project <b>{0}</b>.""" |
283 """<p>The diagram belongs to the project <b>{0}</b>.""" |
284 """ Shall this project be opened?</p>""").format( |
284 """ Shall this project be opened?</p>""").format( |
285 projectFile)) |
285 projectFile)) |
286 if res: |
286 if res: |
287 self.project.openProject(projectFile) |
287 self.project.openProject(projectFile) |