eric4.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
__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.
relayout Public method to relayout the diagram.
show Overriden method to show the dialog.

UMLClassDiagram (Constructor)

UMLClassDiagram(file, parent = None, name = None, noAttrs = False)

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)
noAttrs=
flag indicating, that no attributes should be shown (boolean)

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 (float)
y
y-coordinate (float)

UMLClassDiagram.__addLocalClass

__addLocalClass(className, _class, x, y, isRbModule = False)

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 (float)
y
y-coordinate (float)
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 (E4CanvasItem)

UMLClassDiagram.getDiagramName

getDiagramName()

Method to retrieve a name for the diagram.

Returns:
name for the diagram

UMLClassDiagram.relayout

relayout()

Public 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