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