|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.Graphics.UMLGraphicsView</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.UMLGraphicsView</h1> |
|
24 |
|
25 <p> |
|
26 Module implementing a subclass of EricGraphicsView for our 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="#UMLGraphicsView">UMLGraphicsView</a></td> |
|
39 <td>Class implementing a specialized EricGraphicsView for our diagrams.</td> |
|
40 </tr> |
|
41 </table> |
|
42 <h3>Functions</h3> |
|
43 |
|
44 <table> |
|
45 <tr><td>None</td></tr> |
|
46 </table> |
|
47 <hr /> |
|
48 <hr /> |
|
49 <a NAME="UMLGraphicsView" ID="UMLGraphicsView"></a> |
|
50 <h2>UMLGraphicsView</h2> |
|
51 |
|
52 <p> |
|
53 Class implementing a specialized EricGraphicsView for our diagrams. |
|
54 </p> |
|
55 <h3>Signals</h3> |
|
56 <dl> |
|
57 |
|
58 <dt>relayout()</dt> |
|
59 <dd> |
|
60 emitted to indicate a relayout of the diagram |
|
61 is requested |
|
62 </dd> |
|
63 </dl> |
|
64 <h3>Derived from</h3> |
|
65 EricGraphicsView |
|
66 <h3>Class Attributes</h3> |
|
67 |
|
68 <table> |
|
69 <tr><td>None</td></tr> |
|
70 </table> |
|
71 <h3>Class Methods</h3> |
|
72 |
|
73 <table> |
|
74 <tr><td>None</td></tr> |
|
75 </table> |
|
76 <h3>Methods</h3> |
|
77 |
|
78 <table> |
|
79 |
|
80 <tr> |
|
81 <td><a href="#UMLGraphicsView.__init__">UMLGraphicsView</a></td> |
|
82 <td>Constructor</td> |
|
83 </tr> |
|
84 <tr> |
|
85 <td><a href="#UMLGraphicsView.__alignShapes">__alignShapes</a></td> |
|
86 <td>Private slot to align the selected shapes.</td> |
|
87 </tr> |
|
88 <tr> |
|
89 <td><a href="#UMLGraphicsView.__checkSizeActions">__checkSizeActions</a></td> |
|
90 <td>Private slot to set the enabled state of the size actions.</td> |
|
91 </tr> |
|
92 <tr> |
|
93 <td><a href="#UMLGraphicsView.__decHeight">__decHeight</a></td> |
|
94 <td>Private method to handle the decrease height context menu entry.</td> |
|
95 </tr> |
|
96 <tr> |
|
97 <td><a href="#UMLGraphicsView.__decWidth">__decWidth</a></td> |
|
98 <td>Private method to handle the decrease width context menu entry.</td> |
|
99 </tr> |
|
100 <tr> |
|
101 <td><a href="#UMLGraphicsView.__deleteShape">__deleteShape</a></td> |
|
102 <td>Private method to delete the selected shapes from the display.</td> |
|
103 </tr> |
|
104 <tr> |
|
105 <td><a href="#UMLGraphicsView.__incHeight">__incHeight</a></td> |
|
106 <td>Private method to handle the increase height context menu entry.</td> |
|
107 </tr> |
|
108 <tr> |
|
109 <td><a href="#UMLGraphicsView.__incWidth">__incWidth</a></td> |
|
110 <td>Private method to handle the increase width context menu entry.</td> |
|
111 </tr> |
|
112 <tr> |
|
113 <td><a href="#UMLGraphicsView.__initActions">__initActions</a></td> |
|
114 <td>Private method to initialize the view actions.</td> |
|
115 </tr> |
|
116 <tr> |
|
117 <td><a href="#UMLGraphicsView.__itemsBoundingRect">__itemsBoundingRect</a></td> |
|
118 <td>Private method to calculate the bounding rectangle of the given items.</td> |
|
119 </tr> |
|
120 <tr> |
|
121 <td><a href="#UMLGraphicsView.__printPreviewPrint">__printPreviewPrint</a></td> |
|
122 <td>Private slot to generate a print preview.</td> |
|
123 </tr> |
|
124 <tr> |
|
125 <td><a href="#UMLGraphicsView.__relayout">__relayout</a></td> |
|
126 <td>Private slot to handle the re-layout context menu entry.</td> |
|
127 </tr> |
|
128 <tr> |
|
129 <td><a href="#UMLGraphicsView.__rescan">__rescan</a></td> |
|
130 <td>Private slot to handle the re-scan context menu entry.</td> |
|
131 </tr> |
|
132 <tr> |
|
133 <td><a href="#UMLGraphicsView.__sceneChanged">__sceneChanged</a></td> |
|
134 <td>Private slot called when the scene changes.</td> |
|
135 </tr> |
|
136 <tr> |
|
137 <td><a href="#UMLGraphicsView.__setSize">__setSize</a></td> |
|
138 <td>Private method to handle the set size context menu entry.</td> |
|
139 </tr> |
|
140 <tr> |
|
141 <td><a href="#UMLGraphicsView.autoAdjustSceneSize">autoAdjustSceneSize</a></td> |
|
142 <td>Public method to adjust the scene size to the diagram size.</td> |
|
143 </tr> |
|
144 <tr> |
|
145 <td><a href="#UMLGraphicsView.event">event</a></td> |
|
146 <td>Public method handling events.</td> |
|
147 </tr> |
|
148 <tr> |
|
149 <td><a href="#UMLGraphicsView.filteredItems">filteredItems</a></td> |
|
150 <td>Public method to filter a list of items.</td> |
|
151 </tr> |
|
152 <tr> |
|
153 <td><a href="#UMLGraphicsView.findItem">findItem</a></td> |
|
154 <td>Public method to find an UML item based on the ID.</td> |
|
155 </tr> |
|
156 <tr> |
|
157 <td><a href="#UMLGraphicsView.findItemByName">findItemByName</a></td> |
|
158 <td>Public method to find an UML item based on its name.</td> |
|
159 </tr> |
|
160 <tr> |
|
161 <td><a href="#UMLGraphicsView.fromDict">fromDict</a></td> |
|
162 <td>Public method to populate the class with data persisted by 'toDict()'.</td> |
|
163 </tr> |
|
164 <tr> |
|
165 <td><a href="#UMLGraphicsView.gestureEvent">gestureEvent</a></td> |
|
166 <td>Protected method handling gesture events.</td> |
|
167 </tr> |
|
168 <tr> |
|
169 <td><a href="#UMLGraphicsView.getItemId">getItemId</a></td> |
|
170 <td>Public method to get the ID to be assigned to an item.</td> |
|
171 </tr> |
|
172 <tr> |
|
173 <td><a href="#UMLGraphicsView.initToolBar">initToolBar</a></td> |
|
174 <td>Public method to populate a toolbar with our actions.</td> |
|
175 </tr> |
|
176 <tr> |
|
177 <td><a href="#UMLGraphicsView.keyPressEvent">keyPressEvent</a></td> |
|
178 <td>Protected method handling key press events.</td> |
|
179 </tr> |
|
180 <tr> |
|
181 <td><a href="#UMLGraphicsView.parsePersistenceData">parsePersistenceData</a></td> |
|
182 <td>Public method to parse persisted data.</td> |
|
183 </tr> |
|
184 <tr> |
|
185 <td><a href="#UMLGraphicsView.printDiagram">printDiagram</a></td> |
|
186 <td>Public slot called to print the diagram.</td> |
|
187 </tr> |
|
188 <tr> |
|
189 <td><a href="#UMLGraphicsView.printPreviewDiagram">printPreviewDiagram</a></td> |
|
190 <td>Public slot called to show a print preview of the diagram.</td> |
|
191 </tr> |
|
192 <tr> |
|
193 <td><a href="#UMLGraphicsView.saveImage">saveImage</a></td> |
|
194 <td>Public method to handle the save context menu entry.</td> |
|
195 </tr> |
|
196 <tr> |
|
197 <td><a href="#UMLGraphicsView.selectItem">selectItem</a></td> |
|
198 <td>Public method to select an item.</td> |
|
199 </tr> |
|
200 <tr> |
|
201 <td><a href="#UMLGraphicsView.selectItems">selectItems</a></td> |
|
202 <td>Public method to select the given items.</td> |
|
203 </tr> |
|
204 <tr> |
|
205 <td><a href="#UMLGraphicsView.setDiagramName">setDiagramName</a></td> |
|
206 <td>Public slot to set the diagram name.</td> |
|
207 </tr> |
|
208 <tr> |
|
209 <td><a href="#UMLGraphicsView.setLayoutActionsEnabled">setLayoutActionsEnabled</a></td> |
|
210 <td>Public method to enable or disable the layout related actions.</td> |
|
211 </tr> |
|
212 <tr> |
|
213 <td><a href="#UMLGraphicsView.toDict">toDict</a></td> |
|
214 <td>Public method to collect data to be persisted.</td> |
|
215 </tr> |
|
216 <tr> |
|
217 <td><a href="#UMLGraphicsView.wheelEvent">wheelEvent</a></td> |
|
218 <td>Protected method to handle wheel events.</td> |
|
219 </tr> |
|
220 </table> |
|
221 <h3>Static Methods</h3> |
|
222 |
|
223 <table> |
|
224 <tr><td>None</td></tr> |
|
225 </table> |
|
226 |
|
227 <a NAME="UMLGraphicsView.__init__" ID="UMLGraphicsView.__init__"></a> |
|
228 <h4>UMLGraphicsView (Constructor)</h4> |
|
229 <b>UMLGraphicsView</b>(<i>scene, parent=None</i>) |
|
230 |
|
231 <p> |
|
232 Constructor |
|
233 </p> |
|
234 <dl> |
|
235 |
|
236 <dt><i>scene</i> (QGraphicsScene)</dt> |
|
237 <dd> |
|
238 reference to the scene object |
|
239 </dd> |
|
240 <dt><i>parent</i> (QWidget)</dt> |
|
241 <dd> |
|
242 parent widget of the view |
|
243 </dd> |
|
244 </dl> |
|
245 <a NAME="UMLGraphicsView.__alignShapes" ID="UMLGraphicsView.__alignShapes"></a> |
|
246 <h4>UMLGraphicsView.__alignShapes</h4> |
|
247 <b>__alignShapes</b>(<i>alignment</i>) |
|
248 |
|
249 <p> |
|
250 Private slot to align the selected shapes. |
|
251 </p> |
|
252 <dl> |
|
253 |
|
254 <dt><i>alignment</i> (Qt.AlignmentFlag)</dt> |
|
255 <dd> |
|
256 alignment type |
|
257 </dd> |
|
258 </dl> |
|
259 <a NAME="UMLGraphicsView.__checkSizeActions" ID="UMLGraphicsView.__checkSizeActions"></a> |
|
260 <h4>UMLGraphicsView.__checkSizeActions</h4> |
|
261 <b>__checkSizeActions</b>(<i></i>) |
|
262 |
|
263 <p> |
|
264 Private slot to set the enabled state of the size actions. |
|
265 </p> |
|
266 <a NAME="UMLGraphicsView.__decHeight" ID="UMLGraphicsView.__decHeight"></a> |
|
267 <h4>UMLGraphicsView.__decHeight</h4> |
|
268 <b>__decHeight</b>(<i></i>) |
|
269 |
|
270 <p> |
|
271 Private method to handle the decrease height context menu entry. |
|
272 </p> |
|
273 <a NAME="UMLGraphicsView.__decWidth" ID="UMLGraphicsView.__decWidth"></a> |
|
274 <h4>UMLGraphicsView.__decWidth</h4> |
|
275 <b>__decWidth</b>(<i></i>) |
|
276 |
|
277 <p> |
|
278 Private method to handle the decrease width context menu entry. |
|
279 </p> |
|
280 <a NAME="UMLGraphicsView.__deleteShape" ID="UMLGraphicsView.__deleteShape"></a> |
|
281 <h4>UMLGraphicsView.__deleteShape</h4> |
|
282 <b>__deleteShape</b>(<i></i>) |
|
283 |
|
284 <p> |
|
285 Private method to delete the selected shapes from the display. |
|
286 </p> |
|
287 <a NAME="UMLGraphicsView.__incHeight" ID="UMLGraphicsView.__incHeight"></a> |
|
288 <h4>UMLGraphicsView.__incHeight</h4> |
|
289 <b>__incHeight</b>(<i></i>) |
|
290 |
|
291 <p> |
|
292 Private method to handle the increase height context menu entry. |
|
293 </p> |
|
294 <a NAME="UMLGraphicsView.__incWidth" ID="UMLGraphicsView.__incWidth"></a> |
|
295 <h4>UMLGraphicsView.__incWidth</h4> |
|
296 <b>__incWidth</b>(<i></i>) |
|
297 |
|
298 <p> |
|
299 Private method to handle the increase width context menu entry. |
|
300 </p> |
|
301 <a NAME="UMLGraphicsView.__initActions" ID="UMLGraphicsView.__initActions"></a> |
|
302 <h4>UMLGraphicsView.__initActions</h4> |
|
303 <b>__initActions</b>(<i></i>) |
|
304 |
|
305 <p> |
|
306 Private method to initialize the view actions. |
|
307 </p> |
|
308 <a NAME="UMLGraphicsView.__itemsBoundingRect" ID="UMLGraphicsView.__itemsBoundingRect"></a> |
|
309 <h4>UMLGraphicsView.__itemsBoundingRect</h4> |
|
310 <b>__itemsBoundingRect</b>(<i>items</i>) |
|
311 |
|
312 <p> |
|
313 Private method to calculate the bounding rectangle of the given items. |
|
314 </p> |
|
315 <dl> |
|
316 |
|
317 <dt><i>items</i> (list of UMLItem)</dt> |
|
318 <dd> |
|
319 list of items to operate on |
|
320 </dd> |
|
321 </dl> |
|
322 <dl> |
|
323 <dt>Return:</dt> |
|
324 <dd> |
|
325 bounding rectangle |
|
326 </dd> |
|
327 </dl> |
|
328 <dl> |
|
329 <dt>Return Type:</dt> |
|
330 <dd> |
|
331 QRectF |
|
332 </dd> |
|
333 </dl> |
|
334 <a NAME="UMLGraphicsView.__printPreviewPrint" ID="UMLGraphicsView.__printPreviewPrint"></a> |
|
335 <h4>UMLGraphicsView.__printPreviewPrint</h4> |
|
336 <b>__printPreviewPrint</b>(<i>printer</i>) |
|
337 |
|
338 <p> |
|
339 Private slot to generate a print preview. |
|
340 </p> |
|
341 <dl> |
|
342 |
|
343 <dt><i>printer</i> (QPrinter)</dt> |
|
344 <dd> |
|
345 reference to the printer object |
|
346 </dd> |
|
347 </dl> |
|
348 <a NAME="UMLGraphicsView.__relayout" ID="UMLGraphicsView.__relayout"></a> |
|
349 <h4>UMLGraphicsView.__relayout</h4> |
|
350 <b>__relayout</b>(<i></i>) |
|
351 |
|
352 <p> |
|
353 Private slot to handle the re-layout context menu entry. |
|
354 </p> |
|
355 <a NAME="UMLGraphicsView.__rescan" ID="UMLGraphicsView.__rescan"></a> |
|
356 <h4>UMLGraphicsView.__rescan</h4> |
|
357 <b>__rescan</b>(<i></i>) |
|
358 |
|
359 <p> |
|
360 Private slot to handle the re-scan context menu entry. |
|
361 </p> |
|
362 <a NAME="UMLGraphicsView.__sceneChanged" ID="UMLGraphicsView.__sceneChanged"></a> |
|
363 <h4>UMLGraphicsView.__sceneChanged</h4> |
|
364 <b>__sceneChanged</b>(<i>areas</i>) |
|
365 |
|
366 <p> |
|
367 Private slot called when the scene changes. |
|
368 </p> |
|
369 <dl> |
|
370 |
|
371 <dt><i>areas</i> (list of QRectF)</dt> |
|
372 <dd> |
|
373 list of rectangles that contain changes |
|
374 </dd> |
|
375 </dl> |
|
376 <a NAME="UMLGraphicsView.__setSize" ID="UMLGraphicsView.__setSize"></a> |
|
377 <h4>UMLGraphicsView.__setSize</h4> |
|
378 <b>__setSize</b>(<i></i>) |
|
379 |
|
380 <p> |
|
381 Private method to handle the set size context menu entry. |
|
382 </p> |
|
383 <a NAME="UMLGraphicsView.autoAdjustSceneSize" ID="UMLGraphicsView.autoAdjustSceneSize"></a> |
|
384 <h4>UMLGraphicsView.autoAdjustSceneSize</h4> |
|
385 <b>autoAdjustSceneSize</b>(<i>limit=False</i>) |
|
386 |
|
387 <p> |
|
388 Public method to adjust the scene size to the diagram size. |
|
389 </p> |
|
390 <dl> |
|
391 |
|
392 <dt><i>limit</i> (bool)</dt> |
|
393 <dd> |
|
394 flag indicating to limit the scene to the |
|
395 initial size |
|
396 </dd> |
|
397 </dl> |
|
398 <a NAME="UMLGraphicsView.event" ID="UMLGraphicsView.event"></a> |
|
399 <h4>UMLGraphicsView.event</h4> |
|
400 <b>event</b>(<i>evt</i>) |
|
401 |
|
402 <p> |
|
403 Public method handling events. |
|
404 </p> |
|
405 <dl> |
|
406 |
|
407 <dt><i>evt</i> (QEvent)</dt> |
|
408 <dd> |
|
409 reference to the event |
|
410 </dd> |
|
411 </dl> |
|
412 <dl> |
|
413 <dt>Return:</dt> |
|
414 <dd> |
|
415 flag indicating, if the event was handled |
|
416 </dd> |
|
417 </dl> |
|
418 <dl> |
|
419 <dt>Return Type:</dt> |
|
420 <dd> |
|
421 bool |
|
422 </dd> |
|
423 </dl> |
|
424 <a NAME="UMLGraphicsView.filteredItems" ID="UMLGraphicsView.filteredItems"></a> |
|
425 <h4>UMLGraphicsView.filteredItems</h4> |
|
426 <b>filteredItems</b>(<i>items, itemType=UMLItem</i>) |
|
427 |
|
428 <p> |
|
429 Public method to filter a list of items. |
|
430 </p> |
|
431 <dl> |
|
432 |
|
433 <dt><i>items</i> (QGraphicsItem)</dt> |
|
434 <dd> |
|
435 list of items as returned by the scene object |
|
436 </dd> |
|
437 <dt><i>itemType</i> (class)</dt> |
|
438 <dd> |
|
439 type to be filtered |
|
440 </dd> |
|
441 </dl> |
|
442 <dl> |
|
443 <dt>Return:</dt> |
|
444 <dd> |
|
445 list of interesting collision items |
|
446 </dd> |
|
447 </dl> |
|
448 <dl> |
|
449 <dt>Return Type:</dt> |
|
450 <dd> |
|
451 QGraphicsItem |
|
452 </dd> |
|
453 </dl> |
|
454 <a NAME="UMLGraphicsView.findItem" ID="UMLGraphicsView.findItem"></a> |
|
455 <h4>UMLGraphicsView.findItem</h4> |
|
456 <b>findItem</b>(<i>itemId</i>) |
|
457 |
|
458 <p> |
|
459 Public method to find an UML item based on the ID. |
|
460 </p> |
|
461 <dl> |
|
462 |
|
463 <dt><i>itemId</i> (int)</dt> |
|
464 <dd> |
|
465 of the item to search for |
|
466 </dd> |
|
467 </dl> |
|
468 <dl> |
|
469 <dt>Return:</dt> |
|
470 <dd> |
|
471 item found or None |
|
472 </dd> |
|
473 </dl> |
|
474 <dl> |
|
475 <dt>Return Type:</dt> |
|
476 <dd> |
|
477 UMLItem |
|
478 </dd> |
|
479 </dl> |
|
480 <a NAME="UMLGraphicsView.findItemByName" ID="UMLGraphicsView.findItemByName"></a> |
|
481 <h4>UMLGraphicsView.findItemByName</h4> |
|
482 <b>findItemByName</b>(<i>name</i>) |
|
483 |
|
484 <p> |
|
485 Public method to find an UML item based on its name. |
|
486 </p> |
|
487 <dl> |
|
488 |
|
489 <dt><i>name</i> (str)</dt> |
|
490 <dd> |
|
491 name to look for |
|
492 </dd> |
|
493 </dl> |
|
494 <dl> |
|
495 <dt>Return:</dt> |
|
496 <dd> |
|
497 item found or None |
|
498 </dd> |
|
499 </dl> |
|
500 <dl> |
|
501 <dt>Return Type:</dt> |
|
502 <dd> |
|
503 UMLItem |
|
504 </dd> |
|
505 </dl> |
|
506 <a NAME="UMLGraphicsView.fromDict" ID="UMLGraphicsView.fromDict"></a> |
|
507 <h4>UMLGraphicsView.fromDict</h4> |
|
508 <b>fromDict</b>(<i>version, data</i>) |
|
509 |
|
510 <p> |
|
511 Public method to populate the class with data persisted by 'toDict()'. |
|
512 </p> |
|
513 <dl> |
|
514 |
|
515 <dt><i>version</i> (str)</dt> |
|
516 <dd> |
|
517 version of the data |
|
518 </dd> |
|
519 <dt><i>data</i> (dict)</dt> |
|
520 <dd> |
|
521 dictionary containing the persisted data |
|
522 </dd> |
|
523 </dl> |
|
524 <dl> |
|
525 <dt>Return:</dt> |
|
526 <dd> |
|
527 flag indicating success |
|
528 </dd> |
|
529 </dl> |
|
530 <dl> |
|
531 <dt>Return Type:</dt> |
|
532 <dd> |
|
533 bool |
|
534 </dd> |
|
535 </dl> |
|
536 <a NAME="UMLGraphicsView.gestureEvent" ID="UMLGraphicsView.gestureEvent"></a> |
|
537 <h4>UMLGraphicsView.gestureEvent</h4> |
|
538 <b>gestureEvent</b>(<i>evt</i>) |
|
539 |
|
540 <p> |
|
541 Protected method handling gesture events. |
|
542 </p> |
|
543 <dl> |
|
544 |
|
545 <dt><i>evt</i> (QGestureEvent)</dt> |
|
546 <dd> |
|
547 reference to the gesture event |
|
548 </dd> |
|
549 </dl> |
|
550 <a NAME="UMLGraphicsView.getItemId" ID="UMLGraphicsView.getItemId"></a> |
|
551 <h4>UMLGraphicsView.getItemId</h4> |
|
552 <b>getItemId</b>(<i></i>) |
|
553 |
|
554 <p> |
|
555 Public method to get the ID to be assigned to an item. |
|
556 </p> |
|
557 <dl> |
|
558 <dt>Return:</dt> |
|
559 <dd> |
|
560 item ID |
|
561 </dd> |
|
562 </dl> |
|
563 <dl> |
|
564 <dt>Return Type:</dt> |
|
565 <dd> |
|
566 int |
|
567 </dd> |
|
568 </dl> |
|
569 <a NAME="UMLGraphicsView.initToolBar" ID="UMLGraphicsView.initToolBar"></a> |
|
570 <h4>UMLGraphicsView.initToolBar</h4> |
|
571 <b>initToolBar</b>(<i></i>) |
|
572 |
|
573 <p> |
|
574 Public method to populate a toolbar with our actions. |
|
575 </p> |
|
576 <dl> |
|
577 <dt>Return:</dt> |
|
578 <dd> |
|
579 the populated toolBar |
|
580 </dd> |
|
581 </dl> |
|
582 <dl> |
|
583 <dt>Return Type:</dt> |
|
584 <dd> |
|
585 QToolBar |
|
586 </dd> |
|
587 </dl> |
|
588 <a NAME="UMLGraphicsView.keyPressEvent" ID="UMLGraphicsView.keyPressEvent"></a> |
|
589 <h4>UMLGraphicsView.keyPressEvent</h4> |
|
590 <b>keyPressEvent</b>(<i>evt</i>) |
|
591 |
|
592 <p> |
|
593 Protected method handling key press events. |
|
594 </p> |
|
595 <dl> |
|
596 |
|
597 <dt><i>evt</i> (QKeyEvent)</dt> |
|
598 <dd> |
|
599 reference to the key event |
|
600 </dd> |
|
601 </dl> |
|
602 <a NAME="UMLGraphicsView.parsePersistenceData" ID="UMLGraphicsView.parsePersistenceData"></a> |
|
603 <h4>UMLGraphicsView.parsePersistenceData</h4> |
|
604 <b>parsePersistenceData</b>(<i>version, data</i>) |
|
605 |
|
606 <p> |
|
607 Public method to parse persisted data. |
|
608 </p> |
|
609 <dl> |
|
610 |
|
611 <dt><i>version</i> (str)</dt> |
|
612 <dd> |
|
613 version of the data |
|
614 </dd> |
|
615 <dt><i>data</i> (list of str)</dt> |
|
616 <dd> |
|
617 persisted data to be parsed |
|
618 </dd> |
|
619 </dl> |
|
620 <dl> |
|
621 <dt>Return:</dt> |
|
622 <dd> |
|
623 tuple of flag indicating success (boolean) and faulty line |
|
624 number |
|
625 </dd> |
|
626 </dl> |
|
627 <dl> |
|
628 <dt>Return Type:</dt> |
|
629 <dd> |
|
630 int |
|
631 </dd> |
|
632 </dl> |
|
633 <a NAME="UMLGraphicsView.printDiagram" ID="UMLGraphicsView.printDiagram"></a> |
|
634 <h4>UMLGraphicsView.printDiagram</h4> |
|
635 <b>printDiagram</b>(<i></i>) |
|
636 |
|
637 <p> |
|
638 Public slot called to print the diagram. |
|
639 </p> |
|
640 <a NAME="UMLGraphicsView.printPreviewDiagram" ID="UMLGraphicsView.printPreviewDiagram"></a> |
|
641 <h4>UMLGraphicsView.printPreviewDiagram</h4> |
|
642 <b>printPreviewDiagram</b>(<i></i>) |
|
643 |
|
644 <p> |
|
645 Public slot called to show a print preview of the diagram. |
|
646 </p> |
|
647 <a NAME="UMLGraphicsView.saveImage" ID="UMLGraphicsView.saveImage"></a> |
|
648 <h4>UMLGraphicsView.saveImage</h4> |
|
649 <b>saveImage</b>(<i></i>) |
|
650 |
|
651 <p> |
|
652 Public method to handle the save context menu entry. |
|
653 </p> |
|
654 <a NAME="UMLGraphicsView.selectItem" ID="UMLGraphicsView.selectItem"></a> |
|
655 <h4>UMLGraphicsView.selectItem</h4> |
|
656 <b>selectItem</b>(<i>item</i>) |
|
657 |
|
658 <p> |
|
659 Public method to select an item. |
|
660 </p> |
|
661 <dl> |
|
662 |
|
663 <dt><i>item</i> (QGraphicsItemItem)</dt> |
|
664 <dd> |
|
665 item to be selected |
|
666 </dd> |
|
667 </dl> |
|
668 <a NAME="UMLGraphicsView.selectItems" ID="UMLGraphicsView.selectItems"></a> |
|
669 <h4>UMLGraphicsView.selectItems</h4> |
|
670 <b>selectItems</b>(<i>items</i>) |
|
671 |
|
672 <p> |
|
673 Public method to select the given items. |
|
674 </p> |
|
675 <dl> |
|
676 |
|
677 <dt><i>items</i> (list of QGraphicsItemItem)</dt> |
|
678 <dd> |
|
679 list of items to be selected |
|
680 </dd> |
|
681 </dl> |
|
682 <a NAME="UMLGraphicsView.setDiagramName" ID="UMLGraphicsView.setDiagramName"></a> |
|
683 <h4>UMLGraphicsView.setDiagramName</h4> |
|
684 <b>setDiagramName</b>(<i>name</i>) |
|
685 |
|
686 <p> |
|
687 Public slot to set the diagram name. |
|
688 </p> |
|
689 <dl> |
|
690 |
|
691 <dt><i>name</i> (str)</dt> |
|
692 <dd> |
|
693 diagram name |
|
694 </dd> |
|
695 </dl> |
|
696 <a NAME="UMLGraphicsView.setLayoutActionsEnabled" ID="UMLGraphicsView.setLayoutActionsEnabled"></a> |
|
697 <h4>UMLGraphicsView.setLayoutActionsEnabled</h4> |
|
698 <b>setLayoutActionsEnabled</b>(<i>enable</i>) |
|
699 |
|
700 <p> |
|
701 Public method to enable or disable the layout related actions. |
|
702 </p> |
|
703 <dl> |
|
704 |
|
705 <dt><i>enable</i> (bool)</dt> |
|
706 <dd> |
|
707 flag indicating the desired enable state |
|
708 </dd> |
|
709 </dl> |
|
710 <a NAME="UMLGraphicsView.toDict" ID="UMLGraphicsView.toDict"></a> |
|
711 <h4>UMLGraphicsView.toDict</h4> |
|
712 <b>toDict</b>(<i></i>) |
|
713 |
|
714 <p> |
|
715 Public method to collect data to be persisted. |
|
716 </p> |
|
717 <dl> |
|
718 <dt>Return:</dt> |
|
719 <dd> |
|
720 dictionary containing data to be persisted |
|
721 </dd> |
|
722 </dl> |
|
723 <dl> |
|
724 <dt>Return Type:</dt> |
|
725 <dd> |
|
726 dict |
|
727 </dd> |
|
728 </dl> |
|
729 <a NAME="UMLGraphicsView.wheelEvent" ID="UMLGraphicsView.wheelEvent"></a> |
|
730 <h4>UMLGraphicsView.wheelEvent</h4> |
|
731 <b>wheelEvent</b>(<i>evt</i>) |
|
732 |
|
733 <p> |
|
734 Protected method to handle wheel events. |
|
735 </p> |
|
736 <dl> |
|
737 |
|
738 <dt><i>evt</i> (QWheelEvent)</dt> |
|
739 <dd> |
|
740 reference to the wheel event |
|
741 </dd> |
|
742 </dl> |
|
743 <div align="right"><a href="#top">Up</a></div> |
|
744 <hr /> |
|
745 </body></html> |