1
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
2
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
4
<title>eric3.Graphics.UMLClassDiagram</title>
6
<body bgcolor="#FFFFFF"><a NAME="top" ID="top"></a>
7
<h1><font color="#0000FF">eric3.Graphics.UMLClassDiagram</font></h1>
9
Module implementing a dialog showing a UML like class diagram.
11
<h3><font color="#FF0000">Classes</font></h3>
14
<td><a href="#UMLClassDiagram">UMLClassDiagram</a></td>
15
<td>Class implementing a dialog showing a UML like class diagram.</td>
18
<h3><font color="#FF0000">Functions</font></h3>
21
<td><a href="#resetCachedWidgets">resetCachedWidgets</a></td>
22
<td>Module function to reset the list of cached widgets.</td>
24
<td><a href="#resetCachedWidgetsByFile">resetCachedWidgetsByFile</a></td>
25
<td>Module function to reset the list of cached widgets belonging to a file.</td>
29
<a NAME="UMLClassDiagram" ID="UMLClassDiagram"></a>
30
<h2><font color="#0000FF">UMLClassDiagram</font></h2>
32
Class implementing a dialog showing a UML like class diagram.
34
<h3><font color="#FF0000">Derived from</font></h3>
36
<h3><font color="#FF0000">Methods</font></h3>
39
<td><a href="#UMLClassDiagram.__init__">UMLClassDiagram</a></td>
42
<td><a href="#UMLClassDiagram.__tr">__tr</a></td>
43
<td>Private method to translate the display strings.</td>
45
<td><a href="#UMLClassDiagram.addExternalClass">addExternalClass</a></td>
46
<td>Private method to add a class defined outside the module.</td>
48
<td><a href="#UMLClassDiagram.addLocalClass">addLocalClass</a></td>
49
<td>Private method to add a class defined in the module.</td>
51
<td><a href="#UMLClassDiagram.arrangeClasses">arrangeClasses</a></td>
52
<td>Private method to arrange the shapes on the canvas.</td>
54
<td><a href="#UMLClassDiagram.buildClasses">buildClasses</a></td>
55
<td>Private method to build the class shapes of the class diagram.</td>
57
<td><a href="#UMLClassDiagram.createAssociations">createAssociations</a></td>
58
<td>Private method to generate the associations between the class shapes.</td>
60
<td><a href="#UMLClassDiagram.getCurrentShape">getCurrentShape</a></td>
61
<td>Private method to get the named shape.</td>
63
<td><a href="#UMLClassDiagram.getDiagramName">getDiagramName</a></td>
64
<td>Method to retrieve a name for the diagram.</td>
66
<td><a href="#UMLClassDiagram.languageChange">languageChange</a></td>
67
<td>Private method used to show the localized strings for this dialog.</td>
69
<td><a href="#UMLClassDiagram.relayout">relayout</a></td>
70
<td>Method to relayout the diagram.</td>
72
<td><a href="#UMLClassDiagram.show">show</a></td>
73
<td>Overriden method to show the dialog.</td>
76
<p><a NAME="UMLClassDiagram.__init__" ID="UMLClassDiagram__init__"></a>
77
<h3><font color="#0000FF">UMLClassDiagram (Constructor)</font></h3>
78
<b>UMLClassDiagram</b>(<i>file, parent = None, name = None, modal = 0, fl = 0, noAttrs=0</i>)
84
filename of a python module to be shown (string)
85
</dd><dt><i>parent</i></dt>
87
parent widget of the view (QWidget)
88
</dd><dt><i>name</i></dt>
90
name of the view widget (QString or string)
91
</dd><dt><i>flags</i></dt>
93
the window flags to be passed to the view widget
94
</dd><dt><i>noAttrs=</i></dt>
96
flag indicating, that no attributes should be shown (boolean)
98
</dl><a NAME="UMLClassDiagram.__tr" ID="UMLClassDiagram__tr"></a>
99
<h3><font color="#0000FF">UMLClassDiagram.__tr</font></h3>
100
<b>__tr</b>(<i>s, c = None</i>)
102
Private method to translate the display strings.
103
</p><a NAME="UMLClassDiagram.addExternalClass" ID="UMLClassDiagramaddExternalClass"></a>
104
<h3><font color="#0000FF">UMLClassDiagram.addExternalClass</font></h3>
105
<b>addExternalClass</b>(<i>_class, x, y</i>)
107
Private method to add a class defined outside the module.
109
If the canvas is too small to take the shape, it
112
<dt><i>_class</i></dt>
114
class to be shown (string)
115
</dd><dt><i>x</i></dt>
117
x-coordinate (integer)
118
</dd><dt><i>y</i></dt>
120
y-coordinate (integer)
122
</dl><a NAME="UMLClassDiagram.addLocalClass" ID="UMLClassDiagramaddLocalClass"></a>
123
<h3><font color="#0000FF">UMLClassDiagram.addLocalClass</font></h3>
124
<b>addLocalClass</b>(<i>className, _class, x, y, isRbModule=0</i>)
126
Private method to add a class defined in the module.
128
If the canvas is too small to take the shape, it
131
<dt><i>className</i></dt>
133
name of the class to be as a dictionary key (string)
134
</dd><dt><i>_class</i></dt>
136
class to be shown (ModuleParser.Class)
137
</dd><dt><i>x</i></dt>
139
x-coordinate (integer)
140
</dd><dt><i>y</i></dt>
142
y-coordinate (integer)
143
</dd><dt><i>isRbModule</i></dt>
145
flag indicating a Ruby module (boolean)
147
</dl><a NAME="UMLClassDiagram.arrangeClasses" ID="UMLClassDiagramarrangeClasses"></a>
148
<h3><font color="#0000FF">UMLClassDiagram.arrangeClasses</font></h3>
149
<b>arrangeClasses</b>(<i>nodes, routes, whiteSpaceFactor = 1.2</i>)
151
Private method to arrange the shapes on the canvas.
153
The algorithm is borrowed from Boa Constructor.
154
</p><a NAME="UMLClassDiagram.buildClasses" ID="UMLClassDiagrambuildClasses"></a>
155
<h3><font color="#0000FF">UMLClassDiagram.buildClasses</font></h3>
156
<b>buildClasses</b>(<i></i>)
158
Private method to build the class shapes of the class diagram.
160
The algorithm is borrowed from Boa Constructor.
161
</p><a NAME="UMLClassDiagram.createAssociations" ID="UMLClassDiagramcreateAssociations"></a>
162
<h3><font color="#0000FF">UMLClassDiagram.createAssociations</font></h3>
163
<b>createAssociations</b>(<i>routes</i>)
165
Private method to generate the associations between the class shapes.
167
<dt><i>routes</i></dt>
169
list of relationsships
171
</dl><a NAME="UMLClassDiagram.getCurrentShape" ID="UMLClassDiagramgetCurrentShape"></a>
172
<h3><font color="#0000FF">UMLClassDiagram.getCurrentShape</font></h3>
173
<b>getCurrentShape</b>(<i>name</i>)
175
Private method to get the named shape.
179
name of the shape (string)
186
</dl><a NAME="UMLClassDiagram.getDiagramName" ID="UMLClassDiagramgetDiagramName"></a>
187
<h3><font color="#0000FF">UMLClassDiagram.getDiagramName</font></h3>
188
<b>getDiagramName</b>(<i></i>)
190
Method to retrieve a name for the diagram.
196
</dl><a NAME="UMLClassDiagram.languageChange" ID="UMLClassDiagramlanguageChange"></a>
197
<h3><font color="#0000FF">UMLClassDiagram.languageChange</font></h3>
198
<b>languageChange</b>(<i></i>)
200
Private method used to show the localized strings for this dialog.
201
</p><a NAME="UMLClassDiagram.relayout" ID="UMLClassDiagramrelayout"></a>
202
<h3><font color="#0000FF">UMLClassDiagram.relayout</font></h3>
203
<b>relayout</b>(<i></i>)
205
Method to relayout the diagram.
206
</p><a NAME="UMLClassDiagram.show" ID="UMLClassDiagramshow"></a>
207
<h3><font color="#0000FF">UMLClassDiagram.show</font></h3>
210
Overriden method to show the dialog.
212
<div align="right"><a href="#top">Up</a></div>
214
<a NAME="resetCachedWidgets" ID="resetCachedWidgets"></a>
215
<h2><font color="#0000FF">resetCachedWidgets</font></h2>
216
<b>resetCachedWidgets</b>(<i></i>)
218
Module function to reset the list of cached widgets.
220
<div align="right"><a href="#top">Up</a></div>
222
<a NAME="resetCachedWidgetsByFile" ID="resetCachedWidgetsByFile"></a>
223
<h2><font color="#0000FF">resetCachedWidgetsByFile</font></h2>
224
<b>resetCachedWidgetsByFile</b>(<i>filename</i>)
226
Module function to reset the list of cached widgets belonging to a file.
230
filename of the widgets to be removed from cache (string)
233
<div align="right"><a href="#top">Up</a></div>
b'\\ No newline at end of file'