|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric6.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><a NAME="top" ID="top"></a> |
|
22 <h1>eric6.Graphics.UMLDialog</h1> |
|
23 <p> |
|
24 Module implementing a dialog showing UML like diagrams. |
|
25 </p> |
|
26 <h3>Global Attributes</h3> |
|
27 <table> |
|
28 <tr><td>None</td></tr> |
|
29 </table> |
|
30 <h3>Classes</h3> |
|
31 <table> |
|
32 <tr> |
|
33 <td><a href="#UMLDialog">UMLDialog</a></td> |
|
34 <td>Class implementing a dialog showing UML like diagrams.</td> |
|
35 </tr> |
|
36 </table> |
|
37 <h3>Functions</h3> |
|
38 <table> |
|
39 <tr><td>None</td></tr> |
|
40 </table> |
|
41 <hr /><hr /> |
|
42 <a NAME="UMLDialog" ID="UMLDialog"></a> |
|
43 <h2>UMLDialog</h2> |
|
44 <p> |
|
45 Class implementing a dialog showing UML like diagrams. |
|
46 </p> |
|
47 <h3>Derived from</h3> |
|
48 E5MainWindow |
|
49 <h3>Class Attributes</h3> |
|
50 <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> |
|
52 </table> |
|
53 <h3>Class Methods</h3> |
|
54 <table> |
|
55 <tr><td>None</td></tr> |
|
56 </table> |
|
57 <h3>Methods</h3> |
|
58 <table> |
|
59 <tr> |
|
60 <td><a href="#UMLDialog.__init__">UMLDialog</a></td> |
|
61 <td>Constructor</td> |
|
62 </tr><tr> |
|
63 <td><a href="#UMLDialog.__diagramBuilder">__diagramBuilder</a></td> |
|
64 <td>Private method to instantiate a diagram builder object.</td> |
|
65 </tr><tr> |
|
66 <td><a href="#UMLDialog.__diagramTypeString">__diagramTypeString</a></td> |
|
67 <td>Private method to generate a readable string for the diagram type.</td> |
|
68 </tr><tr> |
|
69 <td><a href="#UMLDialog.__initActions">__initActions</a></td> |
|
70 <td>Private slot to initialize the actions.</td> |
|
71 </tr><tr> |
|
72 <td><a href="#UMLDialog.__initToolBars">__initToolBars</a></td> |
|
73 <td>Private slot to initialize the toolbars.</td> |
|
74 </tr><tr> |
|
75 <td><a href="#UMLDialog.__relayout">__relayout</a></td> |
|
76 <td>Private method to relayout the diagram.</td> |
|
77 </tr><tr> |
|
78 <td><a href="#UMLDialog.__save">__save</a></td> |
|
79 <td>Private slot to save the diagram with the current name.</td> |
|
80 </tr><tr> |
|
81 <td><a href="#UMLDialog.__saveAs">__saveAs</a></td> |
|
82 <td>Private slot to save the diagram.</td> |
|
83 </tr><tr> |
|
84 <td><a href="#UMLDialog.__showInvalidDataMessage">__showInvalidDataMessage</a></td> |
|
85 <td>Private slot to show a message dialog indicating an invalid data file.</td> |
|
86 </tr><tr> |
|
87 <td><a href="#UMLDialog.load">load</a></td> |
|
88 <td>Public method to load a diagram from a file.</td> |
|
89 </tr><tr> |
|
90 <td><a href="#UMLDialog.show">show</a></td> |
|
91 <td>Public method to show the dialog.</td> |
|
92 </tr> |
|
93 </table> |
|
94 <h3>Static Methods</h3> |
|
95 <table> |
|
96 <tr><td>None</td></tr> |
|
97 </table> |
|
98 <a NAME="UMLDialog.__init__" ID="UMLDialog.__init__"></a> |
|
99 <h4>UMLDialog (Constructor)</h4> |
|
100 <b>UMLDialog</b>(<i>diagramType, project, path="", parent=None, initBuilder=True, **kwargs</i>) |
|
101 <p> |
|
102 Constructor |
|
103 </p><dl> |
|
104 <dt><i>diagramType</i></dt> |
|
105 <dd> |
|
106 type of the diagram (one of ApplicationDiagram, |
|
107 ClassDiagram, ImportsDiagram, NoDiagram, PackageDiagram) |
|
108 </dd><dt><i>project</i></dt> |
|
109 <dd> |
|
110 reference to the project object (Project) |
|
111 </dd><dt><i>path</i></dt> |
|
112 <dd> |
|
113 file or directory path to build the diagram from (string) |
|
114 </dd><dt><i>parent</i></dt> |
|
115 <dd> |
|
116 parent widget of the dialog (QWidget) |
|
117 </dd><dt><i>initBuilder=</i></dt> |
|
118 <dd> |
|
119 flag indicating to initialize the diagram |
|
120 builder (boolean) |
|
121 </dd><dt><i>kwargs=</i></dt> |
|
122 <dd> |
|
123 diagram specific data |
|
124 </dd> |
|
125 </dl><a NAME="UMLDialog.__diagramBuilder" ID="UMLDialog.__diagramBuilder"></a> |
|
126 <h4>UMLDialog.__diagramBuilder</h4> |
|
127 <b>__diagramBuilder</b>(<i>diagramType, path, **kwargs</i>) |
|
128 <p> |
|
129 Private method to instantiate a diagram builder object. |
|
130 </p><dl> |
|
131 <dt><i>diagramType</i></dt> |
|
132 <dd> |
|
133 type of the diagram |
|
134 (one of ApplicationDiagram, ClassDiagram, ImportsDiagram, |
|
135 PackageDiagram) |
|
136 </dd><dt><i>path</i></dt> |
|
137 <dd> |
|
138 file or directory path to build the diagram from (string) |
|
139 </dd><dt><i>kwargs=</i></dt> |
|
140 <dd> |
|
141 diagram specific data |
|
142 </dd> |
|
143 </dl><dl> |
|
144 <dt>Returns:</dt> |
|
145 <dd> |
|
146 reference to the instantiated diagram builder |
|
147 </dd> |
|
148 </dl><dl> |
|
149 <dt>Raises <b>ValueError</b>:</dt> |
|
150 <dd> |
|
151 raised to indicate an illegal diagram type |
|
152 </dd> |
|
153 </dl><a NAME="UMLDialog.__diagramTypeString" ID="UMLDialog.__diagramTypeString"></a> |
|
154 <h4>UMLDialog.__diagramTypeString</h4> |
|
155 <b>__diagramTypeString</b>(<i></i>) |
|
156 <p> |
|
157 Private method to generate a readable string for the diagram type. |
|
158 </p><dl> |
|
159 <dt>Returns:</dt> |
|
160 <dd> |
|
161 readable type string (string) |
|
162 </dd> |
|
163 </dl><a NAME="UMLDialog.__initActions" ID="UMLDialog.__initActions"></a> |
|
164 <h4>UMLDialog.__initActions</h4> |
|
165 <b>__initActions</b>(<i></i>) |
|
166 <p> |
|
167 Private slot to initialize the actions. |
|
168 </p><a NAME="UMLDialog.__initToolBars" ID="UMLDialog.__initToolBars"></a> |
|
169 <h4>UMLDialog.__initToolBars</h4> |
|
170 <b>__initToolBars</b>(<i></i>) |
|
171 <p> |
|
172 Private slot to initialize the toolbars. |
|
173 </p><a NAME="UMLDialog.__relayout" ID="UMLDialog.__relayout"></a> |
|
174 <h4>UMLDialog.__relayout</h4> |
|
175 <b>__relayout</b>(<i></i>) |
|
176 <p> |
|
177 Private method to relayout the diagram. |
|
178 </p><a NAME="UMLDialog.__save" ID="UMLDialog.__save"></a> |
|
179 <h4>UMLDialog.__save</h4> |
|
180 <b>__save</b>(<i></i>) |
|
181 <p> |
|
182 Private slot to save the diagram with the current name. |
|
183 </p><a NAME="UMLDialog.__saveAs" ID="UMLDialog.__saveAs"></a> |
|
184 <h4>UMLDialog.__saveAs</h4> |
|
185 <b>__saveAs</b>(<i>filename=""</i>) |
|
186 <p> |
|
187 Private slot to save the diagram. |
|
188 </p><dl> |
|
189 <dt><i>filename</i></dt> |
|
190 <dd> |
|
191 name of the file to write to (string) |
|
192 </dd> |
|
193 </dl><a NAME="UMLDialog.__showInvalidDataMessage" ID="UMLDialog.__showInvalidDataMessage"></a> |
|
194 <h4>UMLDialog.__showInvalidDataMessage</h4> |
|
195 <b>__showInvalidDataMessage</b>(<i>filename, linenum=-1</i>) |
|
196 <p> |
|
197 Private slot to show a message dialog indicating an invalid data file. |
|
198 </p><dl> |
|
199 <dt><i>filename</i></dt> |
|
200 <dd> |
|
201 name of the file containing the invalid data (string) |
|
202 </dd><dt><i>linenum</i></dt> |
|
203 <dd> |
|
204 number of the invalid line (integer) |
|
205 </dd> |
|
206 </dl><a NAME="UMLDialog.load" ID="UMLDialog.load"></a> |
|
207 <h4>UMLDialog.load</h4> |
|
208 <b>load</b>(<i></i>) |
|
209 <p> |
|
210 Public method to load a diagram from a file. |
|
211 </p><dl> |
|
212 <dt>Returns:</dt> |
|
213 <dd> |
|
214 flag indicating success (boolean) |
|
215 </dd> |
|
216 </dl><a NAME="UMLDialog.show" ID="UMLDialog.show"></a> |
|
217 <h4>UMLDialog.show</h4> |
|
218 <b>show</b>(<i>fromFile=False</i>) |
|
219 <p> |
|
220 Public method to show the dialog. |
|
221 </p><dl> |
|
222 <dt><i>fromFile=</i></dt> |
|
223 <dd> |
|
224 flag indicating, that the diagram was loaded |
|
225 from file (boolean) |
|
226 </dd> |
|
227 </dl> |
|
228 <div align="right"><a href="#top">Up</a></div> |
|
229 <hr /> |
|
230 </body></html> |