eric7/Documentation/Source/eric7.Graphics.UMLDialog.html

branch
eric7
changeset 8372
e0227a7c850e
child 8596
d64760b2da50
equal deleted inserted replaced
8371:d6062691d424 8372:e0227a7c850e
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric7.Graphics.UMLDialog</title>
4 <meta charset="UTF-8">
5 <style>
6 body {
7 background: #EDECE6;
8 margin: 0em 1em 10em 1em;
9 color: black;
10 }
11
12 h1 { color: white; background: #85774A; }
13 h2 { color: white; background: #85774A; }
14 h3 { color: white; background: #9D936E; }
15 h4 { color: white; background: #9D936E; }
16
17 a { color: #BA6D36; }
18
19 </style>
20 </head>
21 <body>
22 <a NAME="top" ID="top"></a>
23 <h1>eric7.Graphics.UMLDialog</h1>
24
25 <p>
26 Module implementing a dialog showing UML like diagrams.
27 </p>
28 <h3>Global Attributes</h3>
29
30 <table>
31 <tr><td>None</td></tr>
32 </table>
33 <h3>Classes</h3>
34
35 <table>
36
37 <tr>
38 <td><a href="#UMLDialog">UMLDialog</a></td>
39 <td>Class implementing a dialog showing UML like diagrams.</td>
40 </tr>
41 <tr>
42 <td><a href="#UMLDialogType">UMLDialogType</a></td>
43 <td>Class defining the UML dialog types.</td>
44 </tr>
45 </table>
46 <h3>Functions</h3>
47
48 <table>
49 <tr><td>None</td></tr>
50 </table>
51 <hr />
52 <hr />
53 <a NAME="UMLDialog" ID="UMLDialog"></a>
54 <h2>UMLDialog</h2>
55
56 <p>
57 Class implementing a dialog showing UML like diagrams.
58 </p>
59 <h3>Derived from</h3>
60 EricMainWindow
61 <h3>Class Attributes</h3>
62
63 <table>
64 <tr><td>FileVersions</td></tr><tr><td>JsonFileVersions</td></tr><tr><td>UMLDialogType2String</td></tr>
65 </table>
66 <h3>Class Methods</h3>
67
68 <table>
69 <tr><td>None</td></tr>
70 </table>
71 <h3>Methods</h3>
72
73 <table>
74
75 <tr>
76 <td><a href="#UMLDialog.__init__">UMLDialog</a></td>
77 <td>Constructor</td>
78 </tr>
79 <tr>
80 <td><a href="#UMLDialog.__diagramBuilder">__diagramBuilder</a></td>
81 <td>Private method to instantiate a diagram builder object.</td>
82 </tr>
83 <tr>
84 <td><a href="#UMLDialog.__getDiagramTitel">__getDiagramTitel</a></td>
85 <td>Private method to get a textual description for the diagram type.</td>
86 </tr>
87 <tr>
88 <td><a href="#UMLDialog.__initActions">__initActions</a></td>
89 <td>Private slot to initialize the actions.</td>
90 </tr>
91 <tr>
92 <td><a href="#UMLDialog.__initToolBars">__initToolBars</a></td>
93 <td>Private slot to initialize the toolbars.</td>
94 </tr>
95 <tr>
96 <td><a href="#UMLDialog.__readJsonGraphicsFile">__readJsonGraphicsFile</a></td>
97 <td>Private method to read an eric graphics file using the JSON based file format.</td>
98 </tr>
99 <tr>
100 <td><a href="#UMLDialog.__readLineBasedGraphicsFile">__readLineBasedGraphicsFile</a></td>
101 <td>Private method to read an eric graphics file using the old line based file format.</td>
102 </tr>
103 <tr>
104 <td><a href="#UMLDialog.__relayout">__relayout</a></td>
105 <td>Private method to re-layout the diagram.</td>
106 </tr>
107 <tr>
108 <td><a href="#UMLDialog.__save">__save</a></td>
109 <td>Private slot to save the diagram with the current name.</td>
110 </tr>
111 <tr>
112 <td><a href="#UMLDialog.__saveAs">__saveAs</a></td>
113 <td>Private slot to save the diagram.</td>
114 </tr>
115 <tr>
116 <td><a href="#UMLDialog.__showInvalidDataMessage">__showInvalidDataMessage</a></td>
117 <td>Private slot to show a message dialog indicating an invalid data file.</td>
118 </tr>
119 <tr>
120 <td><a href="#UMLDialog.__writeJsonGraphicsFile">__writeJsonGraphicsFile</a></td>
121 <td>Private method to write an eric graphics file using the JSON based file format.</td>
122 </tr>
123 <tr>
124 <td><a href="#UMLDialog.load">load</a></td>
125 <td>Public method to load a diagram from a file.</td>
126 </tr>
127 <tr>
128 <td><a href="#UMLDialog.show">show</a></td>
129 <td>Public method to show the dialog.</td>
130 </tr>
131 </table>
132 <h3>Static Methods</h3>
133
134 <table>
135 <tr><td>None</td></tr>
136 </table>
137
138 <a NAME="UMLDialog.__init__" ID="UMLDialog.__init__"></a>
139 <h4>UMLDialog (Constructor)</h4>
140 <b>UMLDialog</b>(<i>diagramType, project, path="", parent=None, initBuilder=True, **kwargs</i>)
141
142 <p>
143 Constructor
144 </p>
145 <dl>
146
147 <dt><i>diagramType</i> (UMLDialogType)</dt>
148 <dd>
149 type of the diagram
150 </dd>
151 <dt><i>project</i> (Project)</dt>
152 <dd>
153 reference to the project object
154 </dd>
155 <dt><i>path</i> (str)</dt>
156 <dd>
157 file or directory path to build the diagram from
158 </dd>
159 <dt><i>parent</i> (QWidget)</dt>
160 <dd>
161 parent widget of the dialog
162 </dd>
163 <dt><i>initBuilder</i> (bool)</dt>
164 <dd>
165 flag indicating to initialize the diagram
166 builder
167 </dd>
168 <dt><i>kwargs=</i> (dict)</dt>
169 <dd>
170 diagram specific data
171 </dd>
172 </dl>
173 <a NAME="UMLDialog.__diagramBuilder" ID="UMLDialog.__diagramBuilder"></a>
174 <h4>UMLDialog.__diagramBuilder</h4>
175 <b>__diagramBuilder</b>(<i>diagramType, path, **kwargs</i>)
176
177 <p>
178 Private method to instantiate a diagram builder object.
179 </p>
180 <dl>
181
182 <dt><i>diagramType</i> (UMLDialogType)</dt>
183 <dd>
184 type of the diagram
185 </dd>
186 <dt><i>path</i> (str)</dt>
187 <dd>
188 file or directory path to build the diagram from
189 </dd>
190 <dt><i>kwargs=</i> (dict)</dt>
191 <dd>
192 diagram specific data
193 </dd>
194 </dl>
195 <dl>
196 <dt>Return:</dt>
197 <dd>
198 reference to the instantiated diagram builder
199 </dd>
200 </dl>
201 <dl>
202 <dt>Return Type:</dt>
203 <dd>
204 UMLDiagramBuilder
205 </dd>
206 </dl>
207 <a NAME="UMLDialog.__getDiagramTitel" ID="UMLDialog.__getDiagramTitel"></a>
208 <h4>UMLDialog.__getDiagramTitel</h4>
209 <b>__getDiagramTitel</b>(<i>diagramType</i>)
210
211 <p>
212 Private method to get a textual description for the diagram type.
213 </p>
214 <dl>
215
216 <dt><i>diagramType</i> (str)</dt>
217 <dd>
218 diagram type string
219 </dd>
220 </dl>
221 <dl>
222 <dt>Return:</dt>
223 <dd>
224 titel of the diagram
225 </dd>
226 </dl>
227 <dl>
228 <dt>Return Type:</dt>
229 <dd>
230 str
231 </dd>
232 </dl>
233 <a NAME="UMLDialog.__initActions" ID="UMLDialog.__initActions"></a>
234 <h4>UMLDialog.__initActions</h4>
235 <b>__initActions</b>(<i></i>)
236
237 <p>
238 Private slot to initialize the actions.
239 </p>
240 <a NAME="UMLDialog.__initToolBars" ID="UMLDialog.__initToolBars"></a>
241 <h4>UMLDialog.__initToolBars</h4>
242 <b>__initToolBars</b>(<i></i>)
243
244 <p>
245 Private slot to initialize the toolbars.
246 </p>
247 <a NAME="UMLDialog.__readJsonGraphicsFile" ID="UMLDialog.__readJsonGraphicsFile"></a>
248 <h4>UMLDialog.__readJsonGraphicsFile</h4>
249 <b>__readJsonGraphicsFile</b>(<i>filename</i>)
250
251 <p>
252 Private method to read an eric graphics file using the JSON based
253 file format.
254 </p>
255 <dl>
256
257 <dt><i>filename</i> (str)</dt>
258 <dd>
259 name of the file to be read
260 </dd>
261 </dl>
262 <dl>
263 <dt>Return:</dt>
264 <dd>
265 flag indicating a successful read
266 </dd>
267 </dl>
268 <dl>
269 <dt>Return Type:</dt>
270 <dd>
271 bool
272 </dd>
273 </dl>
274 <a NAME="UMLDialog.__readLineBasedGraphicsFile" ID="UMLDialog.__readLineBasedGraphicsFile"></a>
275 <h4>UMLDialog.__readLineBasedGraphicsFile</h4>
276 <b>__readLineBasedGraphicsFile</b>(<i>filename</i>)
277
278 <p>
279 Private method to read an eric graphics file using the old line
280 based file format.
281 </p>
282 <dl>
283
284 <dt><i>filename</i> (str)</dt>
285 <dd>
286 name of the file to be read
287 </dd>
288 </dl>
289 <dl>
290 <dt>Return:</dt>
291 <dd>
292 flag indicating success
293 </dd>
294 </dl>
295 <dl>
296 <dt>Return Type:</dt>
297 <dd>
298 bool
299 </dd>
300 </dl>
301 <a NAME="UMLDialog.__relayout" ID="UMLDialog.__relayout"></a>
302 <h4>UMLDialog.__relayout</h4>
303 <b>__relayout</b>(<i></i>)
304
305 <p>
306 Private method to re-layout the diagram.
307 </p>
308 <a NAME="UMLDialog.__save" ID="UMLDialog.__save"></a>
309 <h4>UMLDialog.__save</h4>
310 <b>__save</b>(<i></i>)
311
312 <p>
313 Private slot to save the diagram with the current name.
314 </p>
315 <a NAME="UMLDialog.__saveAs" ID="UMLDialog.__saveAs"></a>
316 <h4>UMLDialog.__saveAs</h4>
317 <b>__saveAs</b>(<i>filename=""</i>)
318
319 <p>
320 Private slot to save the diagram.
321 </p>
322 <dl>
323
324 <dt><i>filename</i> (str)</dt>
325 <dd>
326 name of the file to write to
327 </dd>
328 </dl>
329 <a NAME="UMLDialog.__showInvalidDataMessage" ID="UMLDialog.__showInvalidDataMessage"></a>
330 <h4>UMLDialog.__showInvalidDataMessage</h4>
331 <b>__showInvalidDataMessage</b>(<i>filename, linenum=-1</i>)
332
333 <p>
334 Private slot to show a message dialog indicating an invalid data file.
335 </p>
336 <dl>
337
338 <dt><i>filename</i> (str)</dt>
339 <dd>
340 name of the file containing the invalid data
341 </dd>
342 <dt><i>linenum</i> (int)</dt>
343 <dd>
344 number of the invalid line
345 </dd>
346 </dl>
347 <a NAME="UMLDialog.__writeJsonGraphicsFile" ID="UMLDialog.__writeJsonGraphicsFile"></a>
348 <h4>UMLDialog.__writeJsonGraphicsFile</h4>
349 <b>__writeJsonGraphicsFile</b>(<i>filename</i>)
350
351 <p>
352 Private method to write an eric graphics file using the JSON based
353 file format.
354 </p>
355 <dl>
356
357 <dt><i>filename</i> (str)</dt>
358 <dd>
359 name of the file to write to
360 </dd>
361 </dl>
362 <dl>
363 <dt>Return:</dt>
364 <dd>
365 flag indicating a successful write
366 </dd>
367 </dl>
368 <dl>
369 <dt>Return Type:</dt>
370 <dd>
371 bool
372 </dd>
373 </dl>
374 <a NAME="UMLDialog.load" ID="UMLDialog.load"></a>
375 <h4>UMLDialog.load</h4>
376 <b>load</b>(<i>filename=""</i>)
377
378 <p>
379 Public method to load a diagram from a file.
380 </p>
381 <dl>
382
383 <dt><i>filename</i> (str)</dt>
384 <dd>
385 name of the file to be loaded
386 </dd>
387 </dl>
388 <dl>
389 <dt>Return:</dt>
390 <dd>
391 flag indicating success
392 </dd>
393 </dl>
394 <dl>
395 <dt>Return Type:</dt>
396 <dd>
397 bool
398 </dd>
399 </dl>
400 <a NAME="UMLDialog.show" ID="UMLDialog.show"></a>
401 <h4>UMLDialog.show</h4>
402 <b>show</b>(<i>fromFile=False</i>)
403
404 <p>
405 Public method to show the dialog.
406 </p>
407 <dl>
408
409 <dt><i>fromFile</i> (bool)</dt>
410 <dd>
411 flag indicating, that the diagram was loaded
412 from file
413 </dd>
414 </dl>
415 <div align="right"><a href="#top">Up</a></div>
416 <hr />
417 <hr />
418 <a NAME="UMLDialogType" ID="UMLDialogType"></a>
419 <h2>UMLDialogType</h2>
420
421 <p>
422 Class defining the UML dialog types.
423 </p>
424 <h3>Derived from</h3>
425 enum.Enum
426 <h3>Class Attributes</h3>
427
428 <table>
429 <tr><td>APPLICATION_DIAGRAM</td></tr><tr><td>CLASS_DIAGRAM</td></tr><tr><td>IMPORTS_DIAGRAM</td></tr><tr><td>NO_DIAGRAM</td></tr><tr><td>PACKAGE_DIAGRAM</td></tr>
430 </table>
431 <h3>Class Methods</h3>
432
433 <table>
434 <tr><td>None</td></tr>
435 </table>
436 <h3>Methods</h3>
437
438 <table>
439 <tr><td>None</td></tr>
440 </table>
441 <h3>Static Methods</h3>
442
443 <table>
444 <tr><td>None</td></tr>
445 </table>
446
447 <div align="right"><a href="#top">Up</a></div>
448 <hr />
449 </body></html>

eric ide

mercurial