53 </table> |
53 </table> |
54 <h3>Methods</h3> |
54 <h3>Methods</h3> |
55 <table> |
55 <table> |
56 <tr> |
56 <tr> |
57 <td><a href="#E5GraphicsView.__init__">E5GraphicsView</a></td> |
57 <td><a href="#E5GraphicsView.__init__">E5GraphicsView</a></td> |
58 <td>Constructor</td> |
58 <td>Constructor</td> |
59 </tr><tr> |
59 </tr><tr> |
60 <td><a href="#E5GraphicsView.__getDiagram">__getDiagram</a></td> |
60 <td><a href="#E5GraphicsView.__getDiagram">__getDiagram</a></td> |
61 <td>Private method to retrieve the diagram from the scene fitting it in the minimum rectangle.</td> |
61 <td>Private method to retrieve the diagram from the scene fitting it in the minimum rectangle.</td> |
62 </tr><tr> |
62 </tr><tr> |
63 <td><a href="#E5GraphicsView._getDiagramRect">_getDiagramRect</a></td> |
63 <td><a href="#E5GraphicsView._getDiagramRect">_getDiagramRect</a></td> |
64 <td>Protected method to calculate the minimum rectangle fitting the diagram.</td> |
64 <td>Protected method to calculate the minimum rectangle fitting the diagram.</td> |
65 </tr><tr> |
65 </tr><tr> |
66 <td><a href="#E5GraphicsView._getDiagramSize">_getDiagramSize</a></td> |
66 <td><a href="#E5GraphicsView._getDiagramSize">_getDiagramSize</a></td> |
67 <td>Protected method to calculate the minimum size fitting the diagram.</td> |
67 <td>Protected method to calculate the minimum size fitting the diagram.</td> |
68 </tr><tr> |
68 </tr><tr> |
69 <td><a href="#E5GraphicsView.filteredItems">filteredItems</a></td> |
69 <td><a href="#E5GraphicsView.filteredItems">filteredItems</a></td> |
70 <td>Public method to filter a list of items.</td> |
70 <td>Public method to filter a list of items.</td> |
71 </tr><tr> |
71 </tr><tr> |
72 <td><a href="#E5GraphicsView.printDiagram">printDiagram</a></td> |
72 <td><a href="#E5GraphicsView.printDiagram">printDiagram</a></td> |
73 <td>Public method to print the diagram.</td> |
73 <td>Public method to print the diagram.</td> |
74 </tr><tr> |
74 </tr><tr> |
75 <td><a href="#E5GraphicsView.resizeScene">resizeScene</a></td> |
75 <td><a href="#E5GraphicsView.resizeScene">resizeScene</a></td> |
76 <td>Public method to resize the scene.</td> |
76 <td>Public method to resize the scene.</td> |
77 </tr><tr> |
77 </tr><tr> |
78 <td><a href="#E5GraphicsView.saveImage">saveImage</a></td> |
78 <td><a href="#E5GraphicsView.saveImage">saveImage</a></td> |
79 <td>Public method to save the scene to a file.</td> |
79 <td>Public method to save the scene to a file.</td> |
80 </tr><tr> |
80 </tr><tr> |
81 <td><a href="#E5GraphicsView.setSceneSize">setSceneSize</a></td> |
81 <td><a href="#E5GraphicsView.setSceneSize">setSceneSize</a></td> |
82 <td>Public method to set the scene size.</td> |
82 <td>Public method to set the scene size.</td> |
83 </tr><tr> |
83 </tr><tr> |
84 <td><a href="#E5GraphicsView.setZoom">setZoom</a></td> |
84 <td><a href="#E5GraphicsView.setZoom">setZoom</a></td> |
85 <td>Public method to set the zoom factor.</td> |
85 <td>Public method to set the zoom factor.</td> |
86 </tr><tr> |
86 </tr><tr> |
87 <td><a href="#E5GraphicsView.zoom">zoom</a></td> |
87 <td><a href="#E5GraphicsView.zoom">zoom</a></td> |
88 <td>Public method to get the current zoom factor.</td> |
88 <td>Public method to get the current zoom factor.</td> |
89 </tr><tr> |
89 </tr><tr> |
90 <td><a href="#E5GraphicsView.zoomIn">zoomIn</a></td> |
90 <td><a href="#E5GraphicsView.zoomIn">zoomIn</a></td> |
91 <td>Public method to zoom in.</td> |
91 <td>Public method to zoom in.</td> |
92 </tr><tr> |
92 </tr><tr> |
93 <td><a href="#E5GraphicsView.zoomOut">zoomOut</a></td> |
93 <td><a href="#E5GraphicsView.zoomOut">zoomOut</a></td> |
94 <td>Public method to zoom out.</td> |
94 <td>Public method to zoom out.</td> |
95 </tr><tr> |
95 </tr><tr> |
96 <td><a href="#E5GraphicsView.zoomReset">zoomReset</a></td> |
96 <td><a href="#E5GraphicsView.zoomReset">zoomReset</a></td> |
97 <td>Public method to handle the reset zoom context menu entry.</td> |
97 <td>Public method to handle the reset zoom context menu entry.</td> |
98 </tr> |
98 </tr> |
99 </table> |
99 </table> |
100 <a NAME="E5GraphicsView.__init__" ID="E5GraphicsView.__init__"></a> |
100 <a NAME="E5GraphicsView.__init__" ID="E5GraphicsView.__init__"></a> |
101 <h4>E5GraphicsView (Constructor)</h4> |
101 <h4>E5GraphicsView (Constructor)</h4> |
102 <b>E5GraphicsView</b>(<i>scene, parent = None</i>) |
102 <b>E5GraphicsView</b>(<i>scene, parent = None</i>) |
103 <p> |
103 <p> |
104 Constructor |
104 Constructor |
105 </p><dl> |
105 </p><dl> |
106 <dt><i>scene</i></dt> |
106 <dt><i>scene</i></dt> |
107 <dd> |
107 <dd> |
108 reference to the scene object (QGraphicsScene) |
108 reference to the scene object (QGraphicsScene) |
109 </dd><dt><i>parent</i></dt> |
109 </dd><dt><i>parent</i></dt> |
110 <dd> |
110 <dd> |
111 parent widget (QWidget) |
111 parent widget (QWidget) |
112 </dd> |
112 </dd> |
113 </dl><a NAME="E5GraphicsView.__getDiagram" ID="E5GraphicsView.__getDiagram"></a> |
113 </dl><a NAME="E5GraphicsView.__getDiagram" ID="E5GraphicsView.__getDiagram"></a> |
114 <h4>E5GraphicsView.__getDiagram</h4> |
114 <h4>E5GraphicsView.__getDiagram</h4> |
115 <b>__getDiagram</b>(<i>rect, format = "PNG", filename = None</i>) |
115 <b>__getDiagram</b>(<i>rect, format = "PNG", filename = None</i>) |
116 <p> |
116 <p> |
117 Private method to retrieve the diagram from the scene fitting it |
117 Private method to retrieve the diagram from the scene fitting it |
118 in the minimum rectangle. |
118 in the minimum rectangle. |
119 </p><dl> |
119 </p><dl> |
120 <dt><i>rect</i></dt> |
120 <dt><i>rect</i></dt> |
121 <dd> |
121 <dd> |
122 minimum rectangle fitting the diagram (QRectF) |
122 minimum rectangle fitting the diagram (QRectF) |
123 </dd><dt><i>format</i></dt> |
123 </dd><dt><i>format</i></dt> |
124 <dd> |
124 <dd> |
125 format for the image file (string) |
125 format for the image file (string) |
126 </dd><dt><i>filename</i></dt> |
126 </dd><dt><i>filename</i></dt> |
127 <dd> |
127 <dd> |
128 name of the file for non pixmaps (string) |
128 name of the file for non pixmaps (string) |
129 </dd> |
129 </dd> |
130 </dl><dl> |
130 </dl><dl> |
131 <dt>Returns:</dt> |
131 <dt>Returns:</dt> |
132 <dd> |
132 <dd> |
133 diagram pixmap to receive the diagram (QPixmap) |
133 diagram pixmap to receive the diagram (QPixmap) |
134 </dd> |
134 </dd> |
135 </dl><a NAME="E5GraphicsView._getDiagramRect" ID="E5GraphicsView._getDiagramRect"></a> |
135 </dl><a NAME="E5GraphicsView._getDiagramRect" ID="E5GraphicsView._getDiagramRect"></a> |
136 <h4>E5GraphicsView._getDiagramRect</h4> |
136 <h4>E5GraphicsView._getDiagramRect</h4> |
137 <b>_getDiagramRect</b>(<i>border = 0</i>) |
137 <b>_getDiagramRect</b>(<i>border = 0</i>) |
138 <p> |
138 <p> |
139 Protected method to calculate the minimum rectangle fitting the diagram. |
139 Protected method to calculate the minimum rectangle fitting the diagram. |
140 </p><dl> |
140 </p><dl> |
141 <dt><i>border</i></dt> |
141 <dt><i>border</i></dt> |
142 <dd> |
142 <dd> |
143 border width to include in the calculation (integer) |
143 border width to include in the calculation (integer) |
144 </dd> |
144 </dd> |
145 </dl><dl> |
145 </dl><dl> |
146 <dt>Returns:</dt> |
146 <dt>Returns:</dt> |
147 <dd> |
147 <dd> |
148 the minimum rectangle (QRectF) |
148 the minimum rectangle (QRectF) |
149 </dd> |
149 </dd> |
150 </dl><a NAME="E5GraphicsView._getDiagramSize" ID="E5GraphicsView._getDiagramSize"></a> |
150 </dl><a NAME="E5GraphicsView._getDiagramSize" ID="E5GraphicsView._getDiagramSize"></a> |
151 <h4>E5GraphicsView._getDiagramSize</h4> |
151 <h4>E5GraphicsView._getDiagramSize</h4> |
152 <b>_getDiagramSize</b>(<i>border = 0</i>) |
152 <b>_getDiagramSize</b>(<i>border = 0</i>) |
153 <p> |
153 <p> |
154 Protected method to calculate the minimum size fitting the diagram. |
154 Protected method to calculate the minimum size fitting the diagram. |
155 </p><dl> |
155 </p><dl> |
156 <dt><i>border</i></dt> |
156 <dt><i>border</i></dt> |
157 <dd> |
157 <dd> |
158 border width to include in the calculation (integer) |
158 border width to include in the calculation (integer) |
159 </dd> |
159 </dd> |
160 </dl><dl> |
160 </dl><dl> |
161 <dt>Returns:</dt> |
161 <dt>Returns:</dt> |
162 <dd> |
162 <dd> |
163 the minimum size (QSizeF) |
163 the minimum size (QSizeF) |
164 </dd> |
164 </dd> |
165 </dl><a NAME="E5GraphicsView.filteredItems" ID="E5GraphicsView.filteredItems"></a> |
165 </dl><a NAME="E5GraphicsView.filteredItems" ID="E5GraphicsView.filteredItems"></a> |
166 <h4>E5GraphicsView.filteredItems</h4> |
166 <h4>E5GraphicsView.filteredItems</h4> |
167 <b>filteredItems</b>(<i>items</i>) |
167 <b>filteredItems</b>(<i>items</i>) |
168 <p> |
168 <p> |
169 Public method to filter a list of items. |
169 Public method to filter a list of items. |
170 </p><dl> |
170 </p><dl> |
171 <dt><i>items</i></dt> |
171 <dt><i>items</i></dt> |
172 <dd> |
172 <dd> |
173 list of items as returned by the scene object |
173 list of items as returned by the scene object |
174 (QGraphicsItem) |
174 (QGraphicsItem) |
175 </dd> |
175 </dd> |
176 </dl><dl> |
176 </dl><dl> |
177 <dt>Returns:</dt> |
177 <dt>Returns:</dt> |
178 <dd> |
178 <dd> |
179 list of interesting collision items (QGraphicsItem) |
179 list of interesting collision items (QGraphicsItem) |
180 </dd> |
180 </dd> |
181 </dl><a NAME="E5GraphicsView.printDiagram" ID="E5GraphicsView.printDiagram"></a> |
181 </dl><a NAME="E5GraphicsView.printDiagram" ID="E5GraphicsView.printDiagram"></a> |
182 <h4>E5GraphicsView.printDiagram</h4> |
182 <h4>E5GraphicsView.printDiagram</h4> |
183 <b>printDiagram</b>(<i>printer, diagramName = ""</i>) |
183 <b>printDiagram</b>(<i>printer, diagramName = ""</i>) |
184 <p> |
184 <p> |
185 Public method to print the diagram. |
185 Public method to print the diagram. |
186 </p><dl> |
186 </p><dl> |
187 <dt><i>printer</i></dt> |
187 <dt><i>printer</i></dt> |
188 <dd> |
188 <dd> |
189 reference to a ready configured printer object (QPrinter) |
189 reference to a ready configured printer object (QPrinter) |
190 </dd><dt><i>diagramName</i></dt> |
190 </dd><dt><i>diagramName</i></dt> |
191 <dd> |
191 <dd> |
192 name of the diagram (string) |
192 name of the diagram (string) |
193 </dd> |
193 </dd> |
194 </dl><a NAME="E5GraphicsView.resizeScene" ID="E5GraphicsView.resizeScene"></a> |
194 </dl><a NAME="E5GraphicsView.resizeScene" ID="E5GraphicsView.resizeScene"></a> |
195 <h4>E5GraphicsView.resizeScene</h4> |
195 <h4>E5GraphicsView.resizeScene</h4> |
196 <b>resizeScene</b>(<i>amount, isWidth = True</i>) |
196 <b>resizeScene</b>(<i>amount, isWidth = True</i>) |
197 <p> |
197 <p> |
198 Public method to resize the scene. |
198 Public method to resize the scene. |
199 </p><dl> |
199 </p><dl> |
200 <dt><i>isWidth</i></dt> |
200 <dt><i>isWidth</i></dt> |
201 <dd> |
201 <dd> |
202 flag indicating width is to be resized (boolean) |
202 flag indicating width is to be resized (boolean) |
203 </dd><dt><i>amount</i></dt> |
203 </dd><dt><i>amount</i></dt> |
204 <dd> |
204 <dd> |
205 size increment (integer) |
205 size increment (integer) |
206 </dd> |
206 </dd> |
207 </dl><a NAME="E5GraphicsView.saveImage" ID="E5GraphicsView.saveImage"></a> |
207 </dl><a NAME="E5GraphicsView.saveImage" ID="E5GraphicsView.saveImage"></a> |
208 <h4>E5GraphicsView.saveImage</h4> |
208 <h4>E5GraphicsView.saveImage</h4> |
209 <b>saveImage</b>(<i>filename, format = "PNG"</i>) |
209 <b>saveImage</b>(<i>filename, format = "PNG"</i>) |
210 <p> |
210 <p> |
211 Public method to save the scene to a file. |
211 Public method to save the scene to a file. |
212 </p><dl> |
212 </p><dl> |
213 <dt><i>filename</i></dt> |
213 <dt><i>filename</i></dt> |
214 <dd> |
214 <dd> |
215 name of the file to write the image to (string) |
215 name of the file to write the image to (string) |
216 </dd><dt><i>format</i></dt> |
216 </dd><dt><i>format</i></dt> |
217 <dd> |
217 <dd> |
218 format for the image file (string) |
218 format for the image file (string) |
219 </dd> |
219 </dd> |
220 </dl><dl> |
220 </dl><dl> |
221 <dt>Returns:</dt> |
221 <dt>Returns:</dt> |
222 <dd> |
222 <dd> |
223 flag indicating success (boolean) |
223 flag indicating success (boolean) |
224 </dd> |
224 </dd> |
225 </dl><a NAME="E5GraphicsView.setSceneSize" ID="E5GraphicsView.setSceneSize"></a> |
225 </dl><a NAME="E5GraphicsView.setSceneSize" ID="E5GraphicsView.setSceneSize"></a> |
226 <h4>E5GraphicsView.setSceneSize</h4> |
226 <h4>E5GraphicsView.setSceneSize</h4> |
227 <b>setSceneSize</b>(<i>width, height</i>) |
227 <b>setSceneSize</b>(<i>width, height</i>) |
228 <p> |
228 <p> |
229 Public method to set the scene size. |
229 Public method to set the scene size. |
230 </p><dl> |
230 </p><dl> |
231 <dt><i>width</i></dt> |
231 <dt><i>width</i></dt> |
232 <dd> |
232 <dd> |
233 width for the scene (integer) |
233 width for the scene (integer) |
234 </dd><dt><i>height</i></dt> |
234 </dd><dt><i>height</i></dt> |
235 <dd> |
235 <dd> |
236 height for the scene (integer) |
236 height for the scene (integer) |
237 </dd> |
237 </dd> |
238 </dl><a NAME="E5GraphicsView.setZoom" ID="E5GraphicsView.setZoom"></a> |
238 </dl><a NAME="E5GraphicsView.setZoom" ID="E5GraphicsView.setZoom"></a> |
239 <h4>E5GraphicsView.setZoom</h4> |
239 <h4>E5GraphicsView.setZoom</h4> |
240 <b>setZoom</b>(<i>zoomFactor</i>) |
240 <b>setZoom</b>(<i>zoomFactor</i>) |
241 <p> |
241 <p> |
242 Public method to set the zoom factor. |
242 Public method to set the zoom factor. |
243 </p><dl> |
243 </p><dl> |
244 <dt><i>zoomFactor</i></dt> |
244 <dt><i>zoomFactor</i></dt> |
245 <dd> |
245 <dd> |
246 new zoom factor (float) |
246 new zoom factor (float) |
247 </dd> |
247 </dd> |
248 </dl><a NAME="E5GraphicsView.zoom" ID="E5GraphicsView.zoom"></a> |
248 </dl><a NAME="E5GraphicsView.zoom" ID="E5GraphicsView.zoom"></a> |
249 <h4>E5GraphicsView.zoom</h4> |
249 <h4>E5GraphicsView.zoom</h4> |
250 <b>zoom</b>(<i></i>) |
250 <b>zoom</b>(<i></i>) |
251 <p> |
251 <p> |
252 Public method to get the current zoom factor. |
252 Public method to get the current zoom factor. |
253 </p><dl> |
253 </p><dl> |
254 <dt>Returns:</dt> |
254 <dt>Returns:</dt> |
255 <dd> |
255 <dd> |
256 current zoom factor (float) |
256 current zoom factor (float) |
257 </dd> |
257 </dd> |
258 </dl><a NAME="E5GraphicsView.zoomIn" ID="E5GraphicsView.zoomIn"></a> |
258 </dl><a NAME="E5GraphicsView.zoomIn" ID="E5GraphicsView.zoomIn"></a> |
259 <h4>E5GraphicsView.zoomIn</h4> |
259 <h4>E5GraphicsView.zoomIn</h4> |
260 <b>zoomIn</b>(<i></i>) |
260 <b>zoomIn</b>(<i></i>) |
261 <p> |
261 <p> |
262 Public method to zoom in. |
262 Public method to zoom in. |
263 </p><a NAME="E5GraphicsView.zoomOut" ID="E5GraphicsView.zoomOut"></a> |
263 </p><a NAME="E5GraphicsView.zoomOut" ID="E5GraphicsView.zoomOut"></a> |
264 <h4>E5GraphicsView.zoomOut</h4> |
264 <h4>E5GraphicsView.zoomOut</h4> |
265 <b>zoomOut</b>(<i></i>) |
265 <b>zoomOut</b>(<i></i>) |
266 <p> |
266 <p> |
267 Public method to zoom out. |
267 Public method to zoom out. |
268 </p><a NAME="E5GraphicsView.zoomReset" ID="E5GraphicsView.zoomReset"></a> |
268 </p><a NAME="E5GraphicsView.zoomReset" ID="E5GraphicsView.zoomReset"></a> |
269 <h4>E5GraphicsView.zoomReset</h4> |
269 <h4>E5GraphicsView.zoomReset</h4> |
270 <b>zoomReset</b>(<i></i>) |
270 <b>zoomReset</b>(<i></i>) |
271 <p> |
271 <p> |
272 Public method to handle the reset zoom context menu entry. |
272 Public method to handle the reset zoom context menu entry. |
273 </p> |
273 </p> |
274 <div align="right"><a href="#top">Up</a></div> |
274 <div align="right"><a href="#top">Up</a></div> |
275 <hr /> |
275 <hr /> |
276 </body></html> |
276 </body></html> |