Thu, 07 Jan 2010 15:06:43 +0000
Ported the UML like diagrams.
Graphics/PackageDiagram.py | file | annotate | diff | comparison | revisions | |
Graphics/UMLClassDiagram.py | file | annotate | diff | comparison | revisions |
--- a/Graphics/PackageDiagram.py Thu Jan 07 14:41:37 2010 +0000 +++ b/Graphics/PackageDiagram.py Thu Jan 07 15:06:43 2010 +0000 @@ -9,6 +9,7 @@ import glob import os.path +import itertools from PyQt4.QtCore import * from PyQt4.QtGui import * @@ -233,7 +234,7 @@ # generations across height y = 10.0 for currentWidth, currentHeight, generation in \ - map(None, widths, heights, generations): + 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)
--- a/Graphics/UMLClassDiagram.py Thu Jan 07 14:41:37 2010 +0000 +++ b/Graphics/UMLClassDiagram.py Thu Jan 07 15:06:43 2010 +0000 @@ -7,6 +7,8 @@ Module implementing a dialog showing a UML like class diagram. """ +import itertools + from PyQt4.QtCore import * from PyQt4.QtGui import * @@ -184,7 +186,7 @@ # generations across height y = 10.0 for currentWidth, currentHeight, generation in \ - map(None, widths, heights, generations): + 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)