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.ModuleItem</h1> |
23 <h1>eric6.Graphics.ModuleItem</h1> |
|
24 |
23 <p> |
25 <p> |
24 Module implementing a module item. |
26 Module implementing a module item. |
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="#ModuleItem">ModuleItem</a></td> |
38 <td><a href="#ModuleItem">ModuleItem</a></td> |
34 <td>Class implementing a module item.</td> |
39 <td>Class implementing a module item.</td> |
35 </tr><tr> |
40 </tr> |
|
41 <tr> |
36 <td><a href="#ModuleModel">ModuleModel</a></td> |
42 <td><a href="#ModuleModel">ModuleModel</a></td> |
37 <td>Class implementing the module model.</td> |
43 <td>Class implementing the module model.</td> |
38 </tr> |
44 </tr> |
39 </table> |
45 </table> |
40 <h3>Functions</h3> |
46 <h3>Functions</h3> |
41 <table> |
47 |
42 <tr><td>None</td></tr> |
48 <table> |
43 </table> |
49 <tr><td>None</td></tr> |
44 <hr /><hr /> |
50 </table> |
|
51 <hr /> |
|
52 <hr /> |
45 <a NAME="ModuleItem" ID="ModuleItem"></a> |
53 <a NAME="ModuleItem" ID="ModuleItem"></a> |
46 <h2>ModuleItem</h2> |
54 <h2>ModuleItem</h2> |
|
55 |
47 <p> |
56 <p> |
48 Class implementing a module item. |
57 Class implementing a module item. |
49 </p> |
58 </p> |
50 <h3>Derived from</h3> |
59 <h3>Derived from</h3> |
51 UMLItem |
60 UMLItem |
52 <h3>Class Attributes</h3> |
61 <h3>Class Attributes</h3> |
|
62 |
53 <table> |
63 <table> |
54 <tr><td>ItemType</td></tr> |
64 <tr><td>ItemType</td></tr> |
55 </table> |
65 </table> |
56 <h3>Class Methods</h3> |
66 <h3>Class Methods</h3> |
|
67 |
57 <table> |
68 <table> |
58 <tr><td>None</td></tr> |
69 <tr><td>None</td></tr> |
59 </table> |
70 </table> |
60 <h3>Methods</h3> |
71 <h3>Methods</h3> |
61 <table> |
72 |
|
73 <table> |
|
74 |
62 <tr> |
75 <tr> |
63 <td><a href="#ModuleItem.__init__">ModuleItem</a></td> |
76 <td><a href="#ModuleItem.__init__">ModuleItem</a></td> |
64 <td>Constructor</td> |
77 <td>Constructor</td> |
65 </tr><tr> |
78 </tr> |
|
79 <tr> |
66 <td><a href="#ModuleItem.__calculateSize">__calculateSize</a></td> |
80 <td><a href="#ModuleItem.__calculateSize">__calculateSize</a></td> |
67 <td>Private method to calculate the size of the module item.</td> |
81 <td>Private method to calculate the size of the module item.</td> |
68 </tr><tr> |
82 </tr> |
|
83 <tr> |
69 <td><a href="#ModuleItem.__createTexts">__createTexts</a></td> |
84 <td><a href="#ModuleItem.__createTexts">__createTexts</a></td> |
70 <td>Private method to create the text items of the module item.</td> |
85 <td>Private method to create the text items of the module item.</td> |
71 </tr><tr> |
86 </tr> |
|
87 <tr> |
72 <td><a href="#ModuleItem.buildItemDataString">buildItemDataString</a></td> |
88 <td><a href="#ModuleItem.buildItemDataString">buildItemDataString</a></td> |
73 <td>Public method to build a string to persist the specific item data.</td> |
89 <td>Public method to build a string to persist the specific item data.</td> |
74 </tr><tr> |
90 </tr> |
|
91 <tr> |
75 <td><a href="#ModuleItem.paint">paint</a></td> |
92 <td><a href="#ModuleItem.paint">paint</a></td> |
76 <td>Public method to paint the item in local coordinates.</td> |
93 <td>Public method to paint the item in local coordinates.</td> |
77 </tr><tr> |
94 </tr> |
|
95 <tr> |
78 <td><a href="#ModuleItem.parseItemDataString">parseItemDataString</a></td> |
96 <td><a href="#ModuleItem.parseItemDataString">parseItemDataString</a></td> |
79 <td>Public method to parse the given persistence data.</td> |
97 <td>Public method to parse the given persistence data.</td> |
80 </tr><tr> |
98 </tr> |
|
99 <tr> |
81 <td><a href="#ModuleItem.setModel">setModel</a></td> |
100 <td><a href="#ModuleItem.setModel">setModel</a></td> |
82 <td>Public method to set the module model.</td> |
101 <td>Public method to set the module model.</td> |
83 </tr> |
102 </tr> |
84 </table> |
103 </table> |
85 <h3>Static Methods</h3> |
104 <h3>Static Methods</h3> |
86 <table> |
105 |
87 <tr><td>None</td></tr> |
106 <table> |
88 </table> |
107 <tr><td>None</td></tr> |
|
108 </table> |
|
109 |
89 <a NAME="ModuleItem.__init__" ID="ModuleItem.__init__"></a> |
110 <a NAME="ModuleItem.__init__" ID="ModuleItem.__init__"></a> |
90 <h4>ModuleItem (Constructor)</h4> |
111 <h4>ModuleItem (Constructor)</h4> |
91 <b>ModuleItem</b>(<i>model=None, x=0, y=0, rounded=False, parent=None, scene=None</i>) |
112 <b>ModuleItem</b>(<i>model=None, x=0, y=0, rounded=False, parent=None, scene=None</i>) |
|
113 |
92 <p> |
114 <p> |
93 Constructor |
115 Constructor |
94 </p><dl> |
116 </p> |
|
117 <dl> |
|
118 |
95 <dt><i>model</i></dt> |
119 <dt><i>model</i></dt> |
96 <dd> |
120 <dd> |
97 module model containing the module data (ModuleModel) |
121 module model containing the module data (ModuleModel) |
98 </dd><dt><i>x</i></dt> |
122 </dd> |
|
123 <dt><i>x</i></dt> |
99 <dd> |
124 <dd> |
100 x-coordinate (integer) |
125 x-coordinate (integer) |
101 </dd><dt><i>y</i></dt> |
126 </dd> |
|
127 <dt><i>y</i></dt> |
102 <dd> |
128 <dd> |
103 y-coordinate (integer) |
129 y-coordinate (integer) |
104 </dd><dt><i>rounded=</i></dt> |
130 </dd> |
|
131 <dt><i>rounded=</i></dt> |
105 <dd> |
132 <dd> |
106 flag indicating a rounded corner (boolean) |
133 flag indicating a rounded corner (boolean) |
107 </dd><dt><i>parent=</i></dt> |
134 </dd> |
|
135 <dt><i>parent=</i></dt> |
108 <dd> |
136 <dd> |
109 reference to the parent object (QGraphicsItem) |
137 reference to the parent object (QGraphicsItem) |
110 </dd><dt><i>scene=</i></dt> |
138 </dd> |
|
139 <dt><i>scene=</i></dt> |
111 <dd> |
140 <dd> |
112 reference to the scene object (QGraphicsScene) |
141 reference to the scene object (QGraphicsScene) |
113 </dd> |
142 </dd> |
114 </dl><a NAME="ModuleItem.__calculateSize" ID="ModuleItem.__calculateSize"></a> |
143 </dl> |
|
144 <a NAME="ModuleItem.__calculateSize" ID="ModuleItem.__calculateSize"></a> |
115 <h4>ModuleItem.__calculateSize</h4> |
145 <h4>ModuleItem.__calculateSize</h4> |
116 <b>__calculateSize</b>(<i></i>) |
146 <b>__calculateSize</b>(<i></i>) |
|
147 |
117 <p> |
148 <p> |
118 Private method to calculate the size of the module item. |
149 Private method to calculate the size of the module item. |
119 </p><a NAME="ModuleItem.__createTexts" ID="ModuleItem.__createTexts"></a> |
150 </p> |
|
151 <a NAME="ModuleItem.__createTexts" ID="ModuleItem.__createTexts"></a> |
120 <h4>ModuleItem.__createTexts</h4> |
152 <h4>ModuleItem.__createTexts</h4> |
121 <b>__createTexts</b>(<i></i>) |
153 <b>__createTexts</b>(<i></i>) |
|
154 |
122 <p> |
155 <p> |
123 Private method to create the text items of the module item. |
156 Private method to create the text items of the module item. |
124 </p><a NAME="ModuleItem.buildItemDataString" ID="ModuleItem.buildItemDataString"></a> |
157 </p> |
|
158 <a NAME="ModuleItem.buildItemDataString" ID="ModuleItem.buildItemDataString"></a> |
125 <h4>ModuleItem.buildItemDataString</h4> |
159 <h4>ModuleItem.buildItemDataString</h4> |
126 <b>buildItemDataString</b>(<i></i>) |
160 <b>buildItemDataString</b>(<i></i>) |
|
161 |
127 <p> |
162 <p> |
128 Public method to build a string to persist the specific item data. |
163 Public method to build a string to persist the specific item data. |
129 </p><p> |
164 </p> |
|
165 <p> |
130 This string must start with ", " and should be built like |
166 This string must start with ", " and should be built like |
131 "attribute=value" with pairs separated by ", ". value must not |
167 "attribute=value" with pairs separated by ", ". value must not |
132 contain ", " or newlines. |
168 contain ", " or newlines. |
133 </p><dl> |
169 </p> |
|
170 <dl> |
134 <dt>Returns:</dt> |
171 <dt>Returns:</dt> |
135 <dd> |
172 <dd> |
136 persistence data (string) |
173 persistence data (string) |
137 </dd> |
174 </dd> |
138 </dl><a NAME="ModuleItem.paint" ID="ModuleItem.paint"></a> |
175 </dl> |
|
176 <a NAME="ModuleItem.paint" ID="ModuleItem.paint"></a> |
139 <h4>ModuleItem.paint</h4> |
177 <h4>ModuleItem.paint</h4> |
140 <b>paint</b>(<i>painter, option, widget=None</i>) |
178 <b>paint</b>(<i>painter, option, widget=None</i>) |
|
179 |
141 <p> |
180 <p> |
142 Public method to paint the item in local coordinates. |
181 Public method to paint the item in local coordinates. |
143 </p><dl> |
182 </p> |
|
183 <dl> |
|
184 |
144 <dt><i>painter</i></dt> |
185 <dt><i>painter</i></dt> |
145 <dd> |
186 <dd> |
146 reference to the painter object (QPainter) |
187 reference to the painter object (QPainter) |
147 </dd><dt><i>option</i></dt> |
188 </dd> |
|
189 <dt><i>option</i></dt> |
148 <dd> |
190 <dd> |
149 style options (QStyleOptionGraphicsItem) |
191 style options (QStyleOptionGraphicsItem) |
150 </dd><dt><i>widget</i></dt> |
192 </dd> |
|
193 <dt><i>widget</i></dt> |
151 <dd> |
194 <dd> |
152 optional reference to the widget painted on (QWidget) |
195 optional reference to the widget painted on (QWidget) |
153 </dd> |
196 </dd> |
154 </dl><a NAME="ModuleItem.parseItemDataString" ID="ModuleItem.parseItemDataString"></a> |
197 </dl> |
|
198 <a NAME="ModuleItem.parseItemDataString" ID="ModuleItem.parseItemDataString"></a> |
155 <h4>ModuleItem.parseItemDataString</h4> |
199 <h4>ModuleItem.parseItemDataString</h4> |
156 <b>parseItemDataString</b>(<i>version, data</i>) |
200 <b>parseItemDataString</b>(<i>version, data</i>) |
|
201 |
157 <p> |
202 <p> |
158 Public method to parse the given persistence data. |
203 Public method to parse the given persistence data. |
159 </p><dl> |
204 </p> |
|
205 <dl> |
|
206 |
160 <dt><i>version</i></dt> |
207 <dt><i>version</i></dt> |
161 <dd> |
208 <dd> |
162 version of the data (string) |
209 version of the data (string) |
163 </dd><dt><i>data</i></dt> |
210 </dd> |
|
211 <dt><i>data</i></dt> |
164 <dd> |
212 <dd> |
165 persisted data to be parsed (string) |
213 persisted data to be parsed (string) |
166 </dd> |
214 </dd> |
167 </dl><dl> |
215 </dl> |
|
216 <dl> |
168 <dt>Returns:</dt> |
217 <dt>Returns:</dt> |
169 <dd> |
218 <dd> |
170 flag indicating success (boolean) |
219 flag indicating success (boolean) |
171 </dd> |
220 </dd> |
172 </dl><a NAME="ModuleItem.setModel" ID="ModuleItem.setModel"></a> |
221 </dl> |
|
222 <a NAME="ModuleItem.setModel" ID="ModuleItem.setModel"></a> |
173 <h4>ModuleItem.setModel</h4> |
223 <h4>ModuleItem.setModel</h4> |
174 <b>setModel</b>(<i>model</i>) |
224 <b>setModel</b>(<i>model</i>) |
|
225 |
175 <p> |
226 <p> |
176 Public method to set the module model. |
227 Public method to set the module model. |
177 </p><dl> |
228 </p> |
|
229 <dl> |
|
230 |
178 <dt><i>model</i></dt> |
231 <dt><i>model</i></dt> |
179 <dd> |
232 <dd> |
180 module model containing the module data (ModuleModel) |
233 module model containing the module data (ModuleModel) |
181 </dd> |
234 </dd> |
182 </dl> |
235 </dl> |
183 <div align="right"><a href="#top">Up</a></div> |
236 <div align="right"><a href="#top">Up</a></div> |
184 <hr /><hr /> |
237 <hr /> |
|
238 <hr /> |
185 <a NAME="ModuleModel" ID="ModuleModel"></a> |
239 <a NAME="ModuleModel" ID="ModuleModel"></a> |
186 <h2>ModuleModel</h2> |
240 <h2>ModuleModel</h2> |
|
241 |
187 <p> |
242 <p> |
188 Class implementing the module model. |
243 Class implementing the module model. |
189 </p> |
244 </p> |
190 <h3>Derived from</h3> |
245 <h3>Derived from</h3> |
191 UMLModel |
246 UMLModel |
192 <h3>Class Attributes</h3> |
247 <h3>Class Attributes</h3> |
|
248 |
193 <table> |
249 <table> |
194 <tr><td>None</td></tr> |
250 <tr><td>None</td></tr> |
195 </table> |
251 </table> |
196 <h3>Class Methods</h3> |
252 <h3>Class Methods</h3> |
|
253 |
197 <table> |
254 <table> |
198 <tr><td>None</td></tr> |
255 <tr><td>None</td></tr> |
199 </table> |
256 </table> |
200 <h3>Methods</h3> |
257 <h3>Methods</h3> |
201 <table> |
258 |
|
259 <table> |
|
260 |
202 <tr> |
261 <tr> |
203 <td><a href="#ModuleModel.__init__">ModuleModel</a></td> |
262 <td><a href="#ModuleModel.__init__">ModuleModel</a></td> |
204 <td>Constructor</td> |
263 <td>Constructor</td> |
205 </tr><tr> |
264 </tr> |
|
265 <tr> |
206 <td><a href="#ModuleModel.addClass">addClass</a></td> |
266 <td><a href="#ModuleModel.addClass">addClass</a></td> |
207 <td>Public method to add a class to the module model.</td> |
267 <td>Public method to add a class to the module model.</td> |
208 </tr><tr> |
268 </tr> |
|
269 <tr> |
209 <td><a href="#ModuleModel.getClasses">getClasses</a></td> |
270 <td><a href="#ModuleModel.getClasses">getClasses</a></td> |
210 <td>Public method to retrieve the classes of the module.</td> |
271 <td>Public method to retrieve the classes of the module.</td> |
211 </tr> |
272 </tr> |
212 </table> |
273 </table> |
213 <h3>Static Methods</h3> |
274 <h3>Static Methods</h3> |
214 <table> |
275 |
215 <tr><td>None</td></tr> |
276 <table> |
216 </table> |
277 <tr><td>None</td></tr> |
|
278 </table> |
|
279 |
217 <a NAME="ModuleModel.__init__" ID="ModuleModel.__init__"></a> |
280 <a NAME="ModuleModel.__init__" ID="ModuleModel.__init__"></a> |
218 <h4>ModuleModel (Constructor)</h4> |
281 <h4>ModuleModel (Constructor)</h4> |
219 <b>ModuleModel</b>(<i>name, classlist=None</i>) |
282 <b>ModuleModel</b>(<i>name, classlist=None</i>) |
|
283 |
220 <p> |
284 <p> |
221 Constructor |
285 Constructor |
222 </p><dl> |
286 </p> |
|
287 <dl> |
|
288 |
223 <dt><i>name</i></dt> |
289 <dt><i>name</i></dt> |
224 <dd> |
290 <dd> |
225 the module name (string) |
291 the module name (string) |
226 </dd><dt><i>classlist</i></dt> |
292 </dd> |
|
293 <dt><i>classlist</i></dt> |
227 <dd> |
294 <dd> |
228 list of class names (list of strings) |
295 list of class names (list of strings) |
229 </dd> |
296 </dd> |
230 </dl><a NAME="ModuleModel.addClass" ID="ModuleModel.addClass"></a> |
297 </dl> |
|
298 <a NAME="ModuleModel.addClass" ID="ModuleModel.addClass"></a> |
231 <h4>ModuleModel.addClass</h4> |
299 <h4>ModuleModel.addClass</h4> |
232 <b>addClass</b>(<i>classname</i>) |
300 <b>addClass</b>(<i>classname</i>) |
|
301 |
233 <p> |
302 <p> |
234 Public method to add a class to the module model. |
303 Public method to add a class to the module model. |
235 </p><dl> |
304 </p> |
|
305 <dl> |
|
306 |
236 <dt><i>classname</i></dt> |
307 <dt><i>classname</i></dt> |
237 <dd> |
308 <dd> |
238 class name to be added (string) |
309 class name to be added (string) |
239 </dd> |
310 </dd> |
240 </dl><a NAME="ModuleModel.getClasses" ID="ModuleModel.getClasses"></a> |
311 </dl> |
|
312 <a NAME="ModuleModel.getClasses" ID="ModuleModel.getClasses"></a> |
241 <h4>ModuleModel.getClasses</h4> |
313 <h4>ModuleModel.getClasses</h4> |
242 <b>getClasses</b>(<i></i>) |
314 <b>getClasses</b>(<i></i>) |
|
315 |
243 <p> |
316 <p> |
244 Public method to retrieve the classes of the module. |
317 Public method to retrieve the classes of the module. |
245 </p><dl> |
318 </p> |
|
319 <dl> |
246 <dt>Returns:</dt> |
320 <dt>Returns:</dt> |
247 <dd> |
321 <dd> |
248 list of class names (list of strings) |
322 list of class names (list of strings) |
249 </dd> |
323 </dd> |
250 </dl> |
324 </dl> |