src/eric7/Documentation/Source/eric7.EricGraphics.EricGraphicsView.html

branch
eric7
changeset 10423
299802979277
parent 9209
b99e7fd55fd3
child 10479
856476537696
equal deleted inserted replaced
10422:e28b89693f37 10423:299802979277
152 <p> 152 <p>
153 Constructor 153 Constructor
154 </p> 154 </p>
155 <dl> 155 <dl>
156 156
157 <dt><i>scene</i></dt> 157 <dt><i>scene</i> (QGraphicsScene)</dt>
158 <dd> 158 <dd>
159 reference to the scene object (QGraphicsScene) 159 reference to the scene object
160 </dd> 160 </dd>
161 <dt><i>parent</i></dt> 161 <dt><i>parent</i> (QWidget)</dt>
162 <dd> 162 <dd>
163 parent widget (QWidget) 163 parent widget
164 </dd> 164 </dd>
165 </dl> 165 </dl>
166 <a NAME="EricGraphicsView.__getDiagram" ID="EricGraphicsView.__getDiagram"></a> 166 <a NAME="EricGraphicsView.__getDiagram" ID="EricGraphicsView.__getDiagram"></a>
167 <h4>EricGraphicsView.__getDiagram</h4> 167 <h4>EricGraphicsView.__getDiagram</h4>
168 <b>__getDiagram</b>(<i>rect, imageFormat="PNG", filename=None</i>) 168 <b>__getDiagram</b>(<i>rect, imageFormat="PNG", filename=None</i>)
179 </dd> 179 </dd>
180 <dt><i>imageFormat</i> (str)</dt> 180 <dt><i>imageFormat</i> (str)</dt>
181 <dd> 181 <dd>
182 format for the image file 182 format for the image file
183 </dd> 183 </dd>
184 <dt><i>filename</i></dt> 184 <dt><i>filename</i> (str)</dt>
185 <dd> 185 <dd>
186 name of the file for non pixmaps 186 name of the file for non pixmaps
187 str
188 </dd> 187 </dd>
189 </dl> 188 </dl>
190 <dl> 189 <dl>
191 <dt>Return:</dt> 190 <dt>Return:</dt>
192 <dd> 191 <dd>
206 <p> 205 <p>
207 Private method determining the zoom level index given a zoom factor. 206 Private method determining the zoom level index given a zoom factor.
208 </p> 207 </p>
209 <dl> 208 <dl>
210 209
211 <dt><i>zoom</i></dt> 210 <dt><i>zoom</i> (int)</dt>
212 <dd> 211 <dd>
213 zoom factor (integer) 212 zoom factor
214 </dd> 213 </dd>
215 </dl> 214 </dl>
216 <dl> 215 <dl>
217 <dt>Return:</dt> 216 <dt>Return:</dt>
218 <dd> 217 <dd>
219 index of zoom factor (integer) 218 index of zoom factor
219 </dd>
220 </dl>
221 <dl>
222 <dt>Return Type:</dt>
223 <dd>
224 int
220 </dd> 225 </dd>
221 </dl> 226 </dl>
222 <a NAME="EricGraphicsView._getDiagramRect" ID="EricGraphicsView._getDiagramRect"></a> 227 <a NAME="EricGraphicsView._getDiagramRect" ID="EricGraphicsView._getDiagramRect"></a>
223 <h4>EricGraphicsView._getDiagramRect</h4> 228 <h4>EricGraphicsView._getDiagramRect</h4>
224 <b>_getDiagramRect</b>(<i>border=0</i>) 229 <b>_getDiagramRect</b>(<i>border=0</i>)
227 Protected method to calculate the minimum rectangle fitting the 232 Protected method to calculate the minimum rectangle fitting the
228 diagram. 233 diagram.
229 </p> 234 </p>
230 <dl> 235 <dl>
231 236
232 <dt><i>border</i></dt> 237 <dt><i>border</i> (int)</dt>
233 <dd> 238 <dd>
234 border width to include in the calculation (integer) 239 border width to include in the calculation
235 </dd> 240 </dd>
236 </dl> 241 </dl>
237 <dl> 242 <dl>
238 <dt>Return:</dt> 243 <dt>Return:</dt>
239 <dd> 244 <dd>
240 the minimum rectangle (QRectF) 245 the minimum rectangle
246 </dd>
247 </dl>
248 <dl>
249 <dt>Return Type:</dt>
250 <dd>
251 QRectF
241 </dd> 252 </dd>
242 </dl> 253 </dl>
243 <a NAME="EricGraphicsView._getDiagramSize" ID="EricGraphicsView._getDiagramSize"></a> 254 <a NAME="EricGraphicsView._getDiagramSize" ID="EricGraphicsView._getDiagramSize"></a>
244 <h4>EricGraphicsView._getDiagramSize</h4> 255 <h4>EricGraphicsView._getDiagramSize</h4>
245 <b>_getDiagramSize</b>(<i>border=0</i>) 256 <b>_getDiagramSize</b>(<i>border=0</i>)
247 <p> 258 <p>
248 Protected method to calculate the minimum size fitting the diagram. 259 Protected method to calculate the minimum size fitting the diagram.
249 </p> 260 </p>
250 <dl> 261 <dl>
251 262
252 <dt><i>border</i></dt> 263 <dt><i>border</i> (int)</dt>
253 <dd> 264 <dd>
254 border width to include in the calculation (integer) 265 border width to include in the calculation
255 </dd> 266 </dd>
256 </dl> 267 </dl>
257 <dl> 268 <dl>
258 <dt>Return:</dt> 269 <dt>Return:</dt>
259 <dd> 270 <dd>
260 the minimum size (QSizeF) 271 the minimum size
272 </dd>
273 </dl>
274 <dl>
275 <dt>Return Type:</dt>
276 <dd>
277 QSizeF
261 </dd> 278 </dd>
262 </dl> 279 </dl>
263 <a NAME="EricGraphicsView.autoAdjustSceneSize" ID="EricGraphicsView.autoAdjustSceneSize"></a> 280 <a NAME="EricGraphicsView.autoAdjustSceneSize" ID="EricGraphicsView.autoAdjustSceneSize"></a>
264 <h4>EricGraphicsView.autoAdjustSceneSize</h4> 281 <h4>EricGraphicsView.autoAdjustSceneSize</h4>
265 <b>autoAdjustSceneSize</b>(<i>limit=False</i>) 282 <b>autoAdjustSceneSize</b>(<i>limit=False</i>)
267 <p> 284 <p>
268 Public method to adjust the scene size to the diagram size. 285 Public method to adjust the scene size to the diagram size.
269 </p> 286 </p>
270 <dl> 287 <dl>
271 288
272 <dt><i>limit</i></dt> 289 <dt><i>limit</i> (bool)</dt>
273 <dd> 290 <dd>
274 flag indicating to limit the scene to the 291 flag indicating to limit the scene to the
275 initial size (boolean) 292 initial size
276 </dd> 293 </dd>
277 </dl> 294 </dl>
278 <a NAME="EricGraphicsView.filteredItems" ID="EricGraphicsView.filteredItems"></a> 295 <a NAME="EricGraphicsView.filteredItems" ID="EricGraphicsView.filteredItems"></a>
279 <h4>EricGraphicsView.filteredItems</h4> 296 <h4>EricGraphicsView.filteredItems</h4>
280 <b>filteredItems</b>(<i>items</i>) 297 <b>filteredItems</b>(<i>items</i>)
282 <p> 299 <p>
283 Public method to filter a list of items. 300 Public method to filter a list of items.
284 </p> 301 </p>
285 <dl> 302 <dl>
286 303
287 <dt><i>items</i></dt> 304 <dt><i>items</i> (QGraphicsItem)</dt>
288 <dd> 305 <dd>
289 list of items as returned by the scene object 306 list of items as returned by the scene object
290 (QGraphicsItem) 307 </dd>
291 </dd> 308 </dl>
292 </dl> 309 <dl>
293 <dl> 310 <dt>Return:</dt>
294 <dt>Return:</dt> 311 <dd>
295 <dd> 312 list of interesting collision items
296 list of interesting collision items (QGraphicsItem) 313 </dd>
314 </dl>
315 <dl>
316 <dt>Return Type:</dt>
317 <dd>
318 QGraphicsItem
297 </dd> 319 </dd>
298 </dl> 320 </dl>
299 <a NAME="EricGraphicsView.getBackgroundColor" ID="EricGraphicsView.getBackgroundColor"></a> 321 <a NAME="EricGraphicsView.getBackgroundColor" ID="EricGraphicsView.getBackgroundColor"></a>
300 <h4>EricGraphicsView.getBackgroundColor</h4> 322 <h4>EricGraphicsView.getBackgroundColor</h4>
301 <b>getBackgroundColor</b>(<i></i>) 323 <b>getBackgroundColor</b>(<i></i>)
360 <p> 382 <p>
361 Public method to print the diagram. 383 Public method to print the diagram.
362 </p> 384 </p>
363 <dl> 385 <dl>
364 386
365 <dt><i>printer</i></dt> 387 <dt><i>printer</i> (QPrinter)</dt>
366 <dd> 388 <dd>
367 reference to a ready configured printer object 389 reference to a ready configured printer object
368 (QPrinter) 390 </dd>
369 </dd> 391 <dt><i>diagramName</i> (float)</dt>
370 <dt><i>diagramName</i></dt> 392 <dd>
371 <dd> 393 name of the diagram
372 name of the diagram (string)
373 </dd> 394 </dd>
374 </dl> 395 </dl>
375 <a NAME="EricGraphicsView.resizeScene" ID="EricGraphicsView.resizeScene"></a> 396 <a NAME="EricGraphicsView.resizeScene" ID="EricGraphicsView.resizeScene"></a>
376 <h4>EricGraphicsView.resizeScene</h4> 397 <h4>EricGraphicsView.resizeScene</h4>
377 <b>resizeScene</b>(<i>amount, isWidth=True</i>) 398 <b>resizeScene</b>(<i>amount, isWidth=True</i>)
379 <p> 400 <p>
380 Public method to resize the scene. 401 Public method to resize the scene.
381 </p> 402 </p>
382 <dl> 403 <dl>
383 404
384 <dt><i>amount</i></dt> 405 <dt><i>amount</i> (int)</dt>
385 <dd> 406 <dd>
386 size increment (integer) 407 size increment
387 </dd> 408 </dd>
388 <dt><i>isWidth</i></dt> 409 <dt><i>isWidth</i> (bool)</dt>
389 <dd> 410 <dd>
390 flag indicating width is to be resized (boolean) 411 flag indicating width is to be resized
391 </dd> 412 </dd>
392 </dl> 413 </dl>
393 <a NAME="EricGraphicsView.saveImage" ID="EricGraphicsView.saveImage"></a> 414 <a NAME="EricGraphicsView.saveImage" ID="EricGraphicsView.saveImage"></a>
394 <h4>EricGraphicsView.saveImage</h4> 415 <h4>EricGraphicsView.saveImage</h4>
395 <b>saveImage</b>(<i>filename, imageFormat="PNG"</i>) 416 <b>saveImage</b>(<i>filename, imageFormat="PNG"</i>)
397 <p> 418 <p>
398 Public method to save the scene to a file. 419 Public method to save the scene to a file.
399 </p> 420 </p>
400 <dl> 421 <dl>
401 422
402 <dt><i>filename</i></dt> 423 <dt><i>filename</i> (float)</dt>
403 <dd> 424 <dd>
404 name of the file to write the image to (string) 425 name of the file to write the image to
405 </dd> 426 </dd>
406 <dt><i>imageFormat</i></dt> 427 <dt><i>imageFormat</i> (float)</dt>
407 <dd> 428 <dd>
408 format for the image file (string) 429 format for the image file
409 </dd> 430 </dd>
410 </dl> 431 </dl>
411 <dl> 432 <dl>
412 <dt>Return:</dt> 433 <dt>Return:</dt>
413 <dd> 434 <dd>
414 flag indicating success (boolean) 435 flag indicating success
436 </dd>
437 </dl>
438 <dl>
439 <dt>Return Type:</dt>
440 <dd>
441 bool
415 </dd> 442 </dd>
416 </dl> 443 </dl>
417 <a NAME="EricGraphicsView.setSceneSize" ID="EricGraphicsView.setSceneSize"></a> 444 <a NAME="EricGraphicsView.setSceneSize" ID="EricGraphicsView.setSceneSize"></a>
418 <h4>EricGraphicsView.setSceneSize</h4> 445 <h4>EricGraphicsView.setSceneSize</h4>
419 <b>setSceneSize</b>(<i>width, height</i>) 446 <b>setSceneSize</b>(<i>width, height</i>)
421 <p> 448 <p>
422 Public method to set the scene size. 449 Public method to set the scene size.
423 </p> 450 </p>
424 <dl> 451 <dl>
425 452
426 <dt><i>width</i></dt> 453 <dt><i>width</i> (float)</dt>
427 <dd> 454 <dd>
428 width for the scene (real) 455 width for the scene
429 </dd> 456 </dd>
430 <dt><i>height</i></dt> 457 <dt><i>height</i> (float)</dt>
431 <dd> 458 <dd>
432 height for the scene (real) 459 height for the scene
433 </dd> 460 </dd>
434 </dl> 461 </dl>
435 <a NAME="EricGraphicsView.setZoom" ID="EricGraphicsView.setZoom"></a> 462 <a NAME="EricGraphicsView.setZoom" ID="EricGraphicsView.setZoom"></a>
436 <h4>EricGraphicsView.setZoom</h4> 463 <h4>EricGraphicsView.setZoom</h4>
437 <b>setZoom</b>(<i>value</i>) 464 <b>setZoom</b>(<i>value</i>)
439 <p> 466 <p>
440 Public method to set the zoom value in percent. 467 Public method to set the zoom value in percent.
441 </p> 468 </p>
442 <dl> 469 <dl>
443 470
444 <dt><i>value</i></dt> 471 <dt><i>value</i> (int)</dt>
445 <dd> 472 <dd>
446 zoom value in percent (integer) 473 zoom value in percent
447 </dd> 474 </dd>
448 </dl> 475 </dl>
449 <a NAME="EricGraphicsView.zoom" ID="EricGraphicsView.zoom"></a> 476 <a NAME="EricGraphicsView.zoom" ID="EricGraphicsView.zoom"></a>
450 <h4>EricGraphicsView.zoom</h4> 477 <h4>EricGraphicsView.zoom</h4>
451 <b>zoom</b>(<i></i>) 478 <b>zoom</b>(<i></i>)
454 Public method to get the current zoom factor in percent. 481 Public method to get the current zoom factor in percent.
455 </p> 482 </p>
456 <dl> 483 <dl>
457 <dt>Return:</dt> 484 <dt>Return:</dt>
458 <dd> 485 <dd>
459 current zoom factor in percent (integer) 486 current zoom factor in percent
487 </dd>
488 </dl>
489 <dl>
490 <dt>Return Type:</dt>
491 <dd>
492 int
460 </dd> 493 </dd>
461 </dl> 494 </dl>
462 <a NAME="EricGraphicsView.zoomIn" ID="EricGraphicsView.zoomIn"></a> 495 <a NAME="EricGraphicsView.zoomIn" ID="EricGraphicsView.zoomIn"></a>
463 <h4>EricGraphicsView.zoomIn</h4> 496 <h4>EricGraphicsView.zoomIn</h4>
464 <b>zoomIn</b>(<i></i>) 497 <b>zoomIn</b>(<i></i>)

eric ide

mercurial