eric3.Graphics.UMLClassDiagram

Module implementing a dialog showing a UML like class diagram.

Classes

UMLClassDiagram Class implementing a dialog showing a UML like class diagram.

Functions

resetCachedWidgets Module function to reset the list of cached widgets.
resetCachedWidgetsByFile Module function to reset the list of cached widgets belonging to a file.


UMLClassDiagram

Class implementing a dialog showing a UML like class diagram.

Derived from

QDialog

Methods

UMLClassDiagram Constructor
__tr Private method to translate the display strings.
addExternalClass Private method to add a class defined outside the module.
addLocalClass Private method to add a class defined in the module.
arrangeClasses Private method to arrange the shapes on the canvas.
buildClasses Private method to build the class shapes of the class diagram.
createAssociations Private method to generate the associations between the class shapes.
getCurrentShape Private method to get the named shape.
getDiagramName Method to retrieve a name for the diagram.
languageChange Private method used to show the localized strings for this dialog.
relayout Method to relayout the diagram.
show Overriden method to show the dialog.

UMLClassDiagram (Constructor)

UMLClassDiagram(file, parent = None, name = None, modal = 0, fl = 0, noAttrs=0)

Constructor

file
filename of a python module to be shown (string)
parent
parent widget of the view (QWidget)
name
name of the view widget (QString or string)
flags
the window flags to be passed to the view widget
noAttrs=
flag indicating, that no attributes should be shown (boolean)

UMLClassDiagram.__tr

__tr(s, c = None)

Private method to translate the display strings.

UMLClassDiagram.addExternalClass

addExternalClass(_class, x, y)

Private method to add a class defined outside the module.

If the canvas is too small to take the shape, it is enlarged.

_class
class to be shown (string)
x
x-coordinate (integer)
y
y-coordinate (integer)

UMLClassDiagram.addLocalClass

addLocalClass(className, _class, x, y, isRbModule=0)

Private method to add a class defined in the module.

If the canvas is too small to take the shape, it is enlarged.

className
name of the class to be as a dictionary key (string)
_class
class to be shown (ModuleParser.Class)
x
x-coordinate (integer)
y
y-coordinate (integer)
isRbModule
flag indicating a Ruby module (boolean)

UMLClassDiagram.arrangeClasses

arrangeClasses(nodes, routes, whiteSpaceFactor = 1.2)

Private method to arrange the shapes on the canvas.

The algorithm is borrowed from Boa Constructor.

UMLClassDiagram.buildClasses

buildClasses()

Private method to build the class shapes of the class diagram.

The algorithm is borrowed from Boa Constructor.

UMLClassDiagram.createAssociations

createAssociations(routes)

Private method to generate the associations between the class shapes.

routes
list of relationsships

UMLClassDiagram.getCurrentShape

getCurrentShape(name)

Private method to get the named shape.

name
name of the shape (string)
Returns:
shape (QCanvasItem)

UMLClassDiagram.getDiagramName

getDiagramName()

Method to retrieve a name for the diagram.

Returns:
name for the diagram

UMLClassDiagram.languageChange

languageChange()

Private method used to show the localized strings for this dialog.

UMLClassDiagram.relayout

relayout()

Method to relayout the diagram.

UMLClassDiagram.show

show()

Overriden method to show the dialog.

Up


resetCachedWidgets

resetCachedWidgets()

Module function to reset the list of cached widgets.

Up


resetCachedWidgetsByFile

resetCachedWidgetsByFile(filename)

Module function to reset the list of cached widgets belonging to a file.

file
filename of the widgets to be removed from cache (string)
Up