16 |
16 |
17 a { color: #BA6D36; } |
17 a { color: #BA6D36; } |
18 |
18 |
19 </style> |
19 </style> |
20 </head> |
20 </head> |
21 <body><a NAME="top" ID="top"></a> |
21 <body> |
|
22 <a NAME="top" ID="top"></a> |
22 <h1>eric6.Graphics.UMLDialog</h1> |
23 <h1>eric6.Graphics.UMLDialog</h1> |
|
24 |
23 <p> |
25 <p> |
24 Module implementing a dialog showing UML like diagrams. |
26 Module implementing a dialog showing UML like diagrams. |
25 </p> |
27 </p> |
26 <h3>Global Attributes</h3> |
28 <h3>Global Attributes</h3> |
|
29 |
27 <table> |
30 <table> |
28 <tr><td>None</td></tr> |
31 <tr><td>None</td></tr> |
29 </table> |
32 </table> |
30 <h3>Classes</h3> |
33 <h3>Classes</h3> |
31 <table> |
34 |
|
35 <table> |
|
36 |
32 <tr> |
37 <tr> |
33 <td><a href="#UMLDialog">UMLDialog</a></td> |
38 <td><a href="#UMLDialog">UMLDialog</a></td> |
34 <td>Class implementing a dialog showing UML like diagrams.</td> |
39 <td>Class implementing a dialog showing UML like diagrams.</td> |
35 </tr> |
40 </tr> |
36 </table> |
41 </table> |
37 <h3>Functions</h3> |
42 <h3>Functions</h3> |
38 <table> |
43 |
39 <tr><td>None</td></tr> |
44 <table> |
40 </table> |
45 <tr><td>None</td></tr> |
41 <hr /><hr /> |
46 </table> |
|
47 <hr /> |
|
48 <hr /> |
42 <a NAME="UMLDialog" ID="UMLDialog"></a> |
49 <a NAME="UMLDialog" ID="UMLDialog"></a> |
43 <h2>UMLDialog</h2> |
50 <h2>UMLDialog</h2> |
|
51 |
44 <p> |
52 <p> |
45 Class implementing a dialog showing UML like diagrams. |
53 Class implementing a dialog showing UML like diagrams. |
46 </p> |
54 </p> |
47 <h3>Derived from</h3> |
55 <h3>Derived from</h3> |
48 E5MainWindow |
56 E5MainWindow |
49 <h3>Class Attributes</h3> |
57 <h3>Class Attributes</h3> |
|
58 |
50 <table> |
59 <table> |
51 <tr><td>ApplicationDiagram</td></tr><tr><td>ClassDiagram</td></tr><tr><td>FileVersions</td></tr><tr><td>ImportsDiagram</td></tr><tr><td>NoDiagram</td></tr><tr><td>PackageDiagram</td></tr> |
60 <tr><td>ApplicationDiagram</td></tr><tr><td>ClassDiagram</td></tr><tr><td>FileVersions</td></tr><tr><td>ImportsDiagram</td></tr><tr><td>NoDiagram</td></tr><tr><td>PackageDiagram</td></tr> |
52 </table> |
61 </table> |
53 <h3>Class Methods</h3> |
62 <h3>Class Methods</h3> |
|
63 |
54 <table> |
64 <table> |
55 <tr><td>None</td></tr> |
65 <tr><td>None</td></tr> |
56 </table> |
66 </table> |
57 <h3>Methods</h3> |
67 <h3>Methods</h3> |
58 <table> |
68 |
|
69 <table> |
|
70 |
59 <tr> |
71 <tr> |
60 <td><a href="#UMLDialog.__init__">UMLDialog</a></td> |
72 <td><a href="#UMLDialog.__init__">UMLDialog</a></td> |
61 <td>Constructor</td> |
73 <td>Constructor</td> |
62 </tr><tr> |
74 </tr> |
|
75 <tr> |
63 <td><a href="#UMLDialog.__diagramBuilder">__diagramBuilder</a></td> |
76 <td><a href="#UMLDialog.__diagramBuilder">__diagramBuilder</a></td> |
64 <td>Private method to instantiate a diagram builder object.</td> |
77 <td>Private method to instantiate a diagram builder object.</td> |
65 </tr><tr> |
78 </tr> |
|
79 <tr> |
66 <td><a href="#UMLDialog.__diagramTypeString">__diagramTypeString</a></td> |
80 <td><a href="#UMLDialog.__diagramTypeString">__diagramTypeString</a></td> |
67 <td>Private method to generate a readable string for the diagram type.</td> |
81 <td>Private method to generate a readable string for the diagram type.</td> |
68 </tr><tr> |
82 </tr> |
|
83 <tr> |
69 <td><a href="#UMLDialog.__initActions">__initActions</a></td> |
84 <td><a href="#UMLDialog.__initActions">__initActions</a></td> |
70 <td>Private slot to initialize the actions.</td> |
85 <td>Private slot to initialize the actions.</td> |
71 </tr><tr> |
86 </tr> |
|
87 <tr> |
72 <td><a href="#UMLDialog.__initToolBars">__initToolBars</a></td> |
88 <td><a href="#UMLDialog.__initToolBars">__initToolBars</a></td> |
73 <td>Private slot to initialize the toolbars.</td> |
89 <td>Private slot to initialize the toolbars.</td> |
74 </tr><tr> |
90 </tr> |
|
91 <tr> |
75 <td><a href="#UMLDialog.__relayout">__relayout</a></td> |
92 <td><a href="#UMLDialog.__relayout">__relayout</a></td> |
76 <td>Private method to relayout the diagram.</td> |
93 <td>Private method to relayout the diagram.</td> |
77 </tr><tr> |
94 </tr> |
|
95 <tr> |
78 <td><a href="#UMLDialog.__save">__save</a></td> |
96 <td><a href="#UMLDialog.__save">__save</a></td> |
79 <td>Private slot to save the diagram with the current name.</td> |
97 <td>Private slot to save the diagram with the current name.</td> |
80 </tr><tr> |
98 </tr> |
|
99 <tr> |
81 <td><a href="#UMLDialog.__saveAs">__saveAs</a></td> |
100 <td><a href="#UMLDialog.__saveAs">__saveAs</a></td> |
82 <td>Private slot to save the diagram.</td> |
101 <td>Private slot to save the diagram.</td> |
83 </tr><tr> |
102 </tr> |
|
103 <tr> |
84 <td><a href="#UMLDialog.__showInvalidDataMessage">__showInvalidDataMessage</a></td> |
104 <td><a href="#UMLDialog.__showInvalidDataMessage">__showInvalidDataMessage</a></td> |
85 <td>Private slot to show a message dialog indicating an invalid data file.</td> |
105 <td>Private slot to show a message dialog indicating an invalid data file.</td> |
86 </tr><tr> |
106 </tr> |
|
107 <tr> |
87 <td><a href="#UMLDialog.load">load</a></td> |
108 <td><a href="#UMLDialog.load">load</a></td> |
88 <td>Public method to load a diagram from a file.</td> |
109 <td>Public method to load a diagram from a file.</td> |
89 </tr><tr> |
110 </tr> |
|
111 <tr> |
90 <td><a href="#UMLDialog.show">show</a></td> |
112 <td><a href="#UMLDialog.show">show</a></td> |
91 <td>Public method to show the dialog.</td> |
113 <td>Public method to show the dialog.</td> |
92 </tr> |
114 </tr> |
93 </table> |
115 </table> |
94 <h3>Static Methods</h3> |
116 <h3>Static Methods</h3> |
95 <table> |
117 |
96 <tr><td>None</td></tr> |
118 <table> |
97 </table> |
119 <tr><td>None</td></tr> |
|
120 </table> |
|
121 |
98 <a NAME="UMLDialog.__init__" ID="UMLDialog.__init__"></a> |
122 <a NAME="UMLDialog.__init__" ID="UMLDialog.__init__"></a> |
99 <h4>UMLDialog (Constructor)</h4> |
123 <h4>UMLDialog (Constructor)</h4> |
100 <b>UMLDialog</b>(<i>diagramType, project, path="", parent=None, initBuilder=True, **kwargs</i>) |
124 <b>UMLDialog</b>(<i>diagramType, project, path="", parent=None, initBuilder=True, **kwargs</i>) |
|
125 |
101 <p> |
126 <p> |
102 Constructor |
127 Constructor |
103 </p><dl> |
128 </p> |
|
129 <dl> |
|
130 |
104 <dt><i>diagramType</i></dt> |
131 <dt><i>diagramType</i></dt> |
105 <dd> |
132 <dd> |
106 type of the diagram (one of ApplicationDiagram, |
133 type of the diagram (one of ApplicationDiagram, |
107 ClassDiagram, ImportsDiagram, NoDiagram, PackageDiagram) |
134 ClassDiagram, ImportsDiagram, NoDiagram, PackageDiagram) |
108 </dd><dt><i>project</i></dt> |
135 </dd> |
|
136 <dt><i>project</i></dt> |
109 <dd> |
137 <dd> |
110 reference to the project object (Project) |
138 reference to the project object (Project) |
111 </dd><dt><i>path</i></dt> |
139 </dd> |
|
140 <dt><i>path</i></dt> |
112 <dd> |
141 <dd> |
113 file or directory path to build the diagram from (string) |
142 file or directory path to build the diagram from (string) |
114 </dd><dt><i>parent</i></dt> |
143 </dd> |
|
144 <dt><i>parent</i></dt> |
115 <dd> |
145 <dd> |
116 parent widget of the dialog (QWidget) |
146 parent widget of the dialog (QWidget) |
117 </dd><dt><i>initBuilder=</i></dt> |
147 </dd> |
|
148 <dt><i>initBuilder=</i></dt> |
118 <dd> |
149 <dd> |
119 flag indicating to initialize the diagram |
150 flag indicating to initialize the diagram |
120 builder (boolean) |
151 builder (boolean) |
121 </dd><dt><i>kwargs=</i></dt> |
152 </dd> |
|
153 <dt><i>kwargs=</i></dt> |
122 <dd> |
154 <dd> |
123 diagram specific data |
155 diagram specific data |
124 </dd> |
156 </dd> |
125 </dl><a NAME="UMLDialog.__diagramBuilder" ID="UMLDialog.__diagramBuilder"></a> |
157 </dl> |
|
158 <a NAME="UMLDialog.__diagramBuilder" ID="UMLDialog.__diagramBuilder"></a> |
126 <h4>UMLDialog.__diagramBuilder</h4> |
159 <h4>UMLDialog.__diagramBuilder</h4> |
127 <b>__diagramBuilder</b>(<i>diagramType, path, **kwargs</i>) |
160 <b>__diagramBuilder</b>(<i>diagramType, path, **kwargs</i>) |
|
161 |
128 <p> |
162 <p> |
129 Private method to instantiate a diagram builder object. |
163 Private method to instantiate a diagram builder object. |
130 </p><dl> |
164 </p> |
|
165 <dl> |
|
166 |
131 <dt><i>diagramType</i></dt> |
167 <dt><i>diagramType</i></dt> |
132 <dd> |
168 <dd> |
133 type of the diagram |
169 type of the diagram |
134 (one of ApplicationDiagram, ClassDiagram, ImportsDiagram, |
170 (one of ApplicationDiagram, ClassDiagram, ImportsDiagram, |
135 PackageDiagram) |
171 PackageDiagram) |
136 </dd><dt><i>path</i></dt> |
172 </dd> |
|
173 <dt><i>path</i></dt> |
137 <dd> |
174 <dd> |
138 file or directory path to build the diagram from (string) |
175 file or directory path to build the diagram from (string) |
139 </dd><dt><i>kwargs=</i></dt> |
176 </dd> |
|
177 <dt><i>kwargs=</i></dt> |
140 <dd> |
178 <dd> |
141 diagram specific data |
179 diagram specific data |
142 </dd> |
180 </dd> |
143 </dl><dl> |
181 </dl> |
|
182 <dl> |
144 <dt>Returns:</dt> |
183 <dt>Returns:</dt> |
145 <dd> |
184 <dd> |
146 reference to the instantiated diagram builder |
185 reference to the instantiated diagram builder |
147 </dd> |
186 </dd> |
148 </dl><dl> |
187 </dl> |
|
188 <dl> |
|
189 |
149 <dt>Raises <b>ValueError</b>:</dt> |
190 <dt>Raises <b>ValueError</b>:</dt> |
150 <dd> |
191 <dd> |
151 raised to indicate an illegal diagram type |
192 raised to indicate an illegal diagram type |
152 </dd> |
193 </dd> |
153 </dl><a NAME="UMLDialog.__diagramTypeString" ID="UMLDialog.__diagramTypeString"></a> |
194 </dl> |
|
195 <a NAME="UMLDialog.__diagramTypeString" ID="UMLDialog.__diagramTypeString"></a> |
154 <h4>UMLDialog.__diagramTypeString</h4> |
196 <h4>UMLDialog.__diagramTypeString</h4> |
155 <b>__diagramTypeString</b>(<i></i>) |
197 <b>__diagramTypeString</b>(<i></i>) |
|
198 |
156 <p> |
199 <p> |
157 Private method to generate a readable string for the diagram type. |
200 Private method to generate a readable string for the diagram type. |
158 </p><dl> |
201 </p> |
|
202 <dl> |
159 <dt>Returns:</dt> |
203 <dt>Returns:</dt> |
160 <dd> |
204 <dd> |
161 readable type string (string) |
205 readable type string (string) |
162 </dd> |
206 </dd> |
163 </dl><a NAME="UMLDialog.__initActions" ID="UMLDialog.__initActions"></a> |
207 </dl> |
|
208 <a NAME="UMLDialog.__initActions" ID="UMLDialog.__initActions"></a> |
164 <h4>UMLDialog.__initActions</h4> |
209 <h4>UMLDialog.__initActions</h4> |
165 <b>__initActions</b>(<i></i>) |
210 <b>__initActions</b>(<i></i>) |
|
211 |
166 <p> |
212 <p> |
167 Private slot to initialize the actions. |
213 Private slot to initialize the actions. |
168 </p><a NAME="UMLDialog.__initToolBars" ID="UMLDialog.__initToolBars"></a> |
214 </p> |
|
215 <a NAME="UMLDialog.__initToolBars" ID="UMLDialog.__initToolBars"></a> |
169 <h4>UMLDialog.__initToolBars</h4> |
216 <h4>UMLDialog.__initToolBars</h4> |
170 <b>__initToolBars</b>(<i></i>) |
217 <b>__initToolBars</b>(<i></i>) |
|
218 |
171 <p> |
219 <p> |
172 Private slot to initialize the toolbars. |
220 Private slot to initialize the toolbars. |
173 </p><a NAME="UMLDialog.__relayout" ID="UMLDialog.__relayout"></a> |
221 </p> |
|
222 <a NAME="UMLDialog.__relayout" ID="UMLDialog.__relayout"></a> |
174 <h4>UMLDialog.__relayout</h4> |
223 <h4>UMLDialog.__relayout</h4> |
175 <b>__relayout</b>(<i></i>) |
224 <b>__relayout</b>(<i></i>) |
|
225 |
176 <p> |
226 <p> |
177 Private method to relayout the diagram. |
227 Private method to relayout the diagram. |
178 </p><a NAME="UMLDialog.__save" ID="UMLDialog.__save"></a> |
228 </p> |
|
229 <a NAME="UMLDialog.__save" ID="UMLDialog.__save"></a> |
179 <h4>UMLDialog.__save</h4> |
230 <h4>UMLDialog.__save</h4> |
180 <b>__save</b>(<i></i>) |
231 <b>__save</b>(<i></i>) |
|
232 |
181 <p> |
233 <p> |
182 Private slot to save the diagram with the current name. |
234 Private slot to save the diagram with the current name. |
183 </p><a NAME="UMLDialog.__saveAs" ID="UMLDialog.__saveAs"></a> |
235 </p> |
|
236 <a NAME="UMLDialog.__saveAs" ID="UMLDialog.__saveAs"></a> |
184 <h4>UMLDialog.__saveAs</h4> |
237 <h4>UMLDialog.__saveAs</h4> |
185 <b>__saveAs</b>(<i>filename=""</i>) |
238 <b>__saveAs</b>(<i>filename=""</i>) |
|
239 |
186 <p> |
240 <p> |
187 Private slot to save the diagram. |
241 Private slot to save the diagram. |
188 </p><dl> |
242 </p> |
|
243 <dl> |
|
244 |
189 <dt><i>filename</i></dt> |
245 <dt><i>filename</i></dt> |
190 <dd> |
246 <dd> |
191 name of the file to write to (string) |
247 name of the file to write to (string) |
192 </dd> |
248 </dd> |
193 </dl><a NAME="UMLDialog.__showInvalidDataMessage" ID="UMLDialog.__showInvalidDataMessage"></a> |
249 </dl> |
|
250 <a NAME="UMLDialog.__showInvalidDataMessage" ID="UMLDialog.__showInvalidDataMessage"></a> |
194 <h4>UMLDialog.__showInvalidDataMessage</h4> |
251 <h4>UMLDialog.__showInvalidDataMessage</h4> |
195 <b>__showInvalidDataMessage</b>(<i>filename, linenum=-1</i>) |
252 <b>__showInvalidDataMessage</b>(<i>filename, linenum=-1</i>) |
|
253 |
196 <p> |
254 <p> |
197 Private slot to show a message dialog indicating an invalid data file. |
255 Private slot to show a message dialog indicating an invalid data file. |
198 </p><dl> |
256 </p> |
|
257 <dl> |
|
258 |
199 <dt><i>filename</i></dt> |
259 <dt><i>filename</i></dt> |
200 <dd> |
260 <dd> |
201 name of the file containing the invalid data (string) |
261 name of the file containing the invalid data (string) |
202 </dd><dt><i>linenum</i></dt> |
262 </dd> |
|
263 <dt><i>linenum</i></dt> |
203 <dd> |
264 <dd> |
204 number of the invalid line (integer) |
265 number of the invalid line (integer) |
205 </dd> |
266 </dd> |
206 </dl><a NAME="UMLDialog.load" ID="UMLDialog.load"></a> |
267 </dl> |
|
268 <a NAME="UMLDialog.load" ID="UMLDialog.load"></a> |
207 <h4>UMLDialog.load</h4> |
269 <h4>UMLDialog.load</h4> |
208 <b>load</b>(<i></i>) |
270 <b>load</b>(<i></i>) |
|
271 |
209 <p> |
272 <p> |
210 Public method to load a diagram from a file. |
273 Public method to load a diagram from a file. |
211 </p><dl> |
274 </p> |
|
275 <dl> |
212 <dt>Returns:</dt> |
276 <dt>Returns:</dt> |
213 <dd> |
277 <dd> |
214 flag indicating success (boolean) |
278 flag indicating success (boolean) |
215 </dd> |
279 </dd> |
216 </dl><a NAME="UMLDialog.show" ID="UMLDialog.show"></a> |
280 </dl> |
|
281 <a NAME="UMLDialog.show" ID="UMLDialog.show"></a> |
217 <h4>UMLDialog.show</h4> |
282 <h4>UMLDialog.show</h4> |
218 <b>show</b>(<i>fromFile=False</i>) |
283 <b>show</b>(<i>fromFile=False</i>) |
|
284 |
219 <p> |
285 <p> |
220 Public method to show the dialog. |
286 Public method to show the dialog. |
221 </p><dl> |
287 </p> |
|
288 <dl> |
|
289 |
222 <dt><i>fromFile=</i></dt> |
290 <dt><i>fromFile=</i></dt> |
223 <dd> |
291 <dd> |
224 flag indicating, that the diagram was loaded |
292 flag indicating, that the diagram was loaded |
225 from file (boolean) |
293 from file (boolean) |
226 </dd> |
294 </dd> |