Graphics/UMLClassDiagramBuilder.py

changeset 2992
dbdf27746da5
parent 2953
703452a2876f
child 3034
7ce719013078
child 3057
10516539f238
diff -r 226481ff40d1 -r dbdf27746da5 Graphics/UMLClassDiagramBuilder.py
--- a/Graphics/UMLClassDiagramBuilder.py	Sun Oct 06 19:52:33 2013 +0200
+++ b/Graphics/UMLClassDiagramBuilder.py	Mon Oct 07 19:10:11 2013 +0200
@@ -29,7 +29,8 @@
         @param view reference to the view object (UMLGraphicsView)
         @param project reference to the project object (Project)
         @param file file name of a python module to be shown (string)
-        @keyparam noAttrs flag indicating, that no attributes should be shown (boolean)
+        @keyparam noAttrs flag indicating, that no attributes should be shown
+            (boolean)
         """
         super().__init__(dialog, view, project)
         self.setObjectName("UMLClassDiagramBuilder")
@@ -72,8 +73,8 @@
         try:
             extensions = Preferences.getPython("PythonExtensions") + \
                 Preferences.getPython("Python3Extensions") + ['.rb']
-            module = Utilities.ModuleParser.readModule(self.file, extensions=extensions,
-                                                       caching=False)
+            module = Utilities.ModuleParser.readModule(
+                self.file, extensions=extensions, caching=False)
         except ImportError:
             ct = QGraphicsTextItem(None)
             ct.setHtml(
@@ -139,8 +140,8 @@
             self.umlView.autoAdjustSceneSize(limit=True)
         else:
             ct = QGraphicsTextItem(None)
-            ct.setHtml(
-                self.trUtf8("The module <b>'{0}'</b> does not contain any classes.")\
+            ct.setHtml(self.trUtf8(
+                "The module <b>'{0}'</b> does not contain any classes.")
                 .format(self.file))
             self.scene.addItem(ct)
         
@@ -163,7 +164,8 @@
         for generation in generations:
             sizes.append([])
             for child in generation:
-                sizes[-1].append(self.__getCurrentShape(child).sceneBoundingRect())
+                sizes[-1].append(
+                    self.__getCurrentShape(child).sceneBoundingRect())
         
         # calculate total width and total height
         width = 0
@@ -212,7 +214,8 @@
                 itertools.zip_longest(widths, heights, generations):
             x = 10.0
             # whiteSpace is the space between any two elements
-            whiteSpace = (width - currentWidth - 20) / (len(generation) - 1.0 or 2.0)
+            whiteSpace = (width - currentWidth - 20) / \
+                (len(generation) - 1.0 or 2.0)
             for className in generation:
                 cw = self.__getCurrentShape(className)
                 cw.setPos(x, y)

eric ide

mercurial