eric6/Documentation/Source/eric6.Graphics.UMLGraphicsView.html

changeset 8289
871b40c5a77a
parent 7989
a21d673a8f99
child 8294
cb4e5bbf3a2c
equal deleted inserted replaced
8288:809d5d5ac2ba 8289:871b40c5a77a
223 <p> 223 <p>
224 Constructor 224 Constructor
225 </p> 225 </p>
226 <dl> 226 <dl>
227 227
228 <dt><i>scene</i></dt> 228 <dt><i>scene</i> (QGraphicsScene)</dt>
229 <dd> 229 <dd>
230 reference to the scene object (QGraphicsScene) 230 reference to the scene object
231 </dd> 231 </dd>
232 <dt><i>parent</i></dt> 232 <dt><i>parent</i> (QWidget)</dt>
233 <dd> 233 <dd>
234 parent widget of the view (QWidget) 234 parent widget of the view
235 </dd> 235 </dd>
236 </dl> 236 </dl>
237 <a NAME="UMLGraphicsView.__alignShapes" ID="UMLGraphicsView.__alignShapes"></a> 237 <a NAME="UMLGraphicsView.__alignShapes" ID="UMLGraphicsView.__alignShapes"></a>
238 <h4>UMLGraphicsView.__alignShapes</h4> 238 <h4>UMLGraphicsView.__alignShapes</h4>
239 <b>__alignShapes</b>(<i>alignment</i>) 239 <b>__alignShapes</b>(<i>alignment</i>)
241 <p> 241 <p>
242 Private slot to align the selected shapes. 242 Private slot to align the selected shapes.
243 </p> 243 </p>
244 <dl> 244 <dl>
245 245
246 <dt><i>alignment</i></dt> 246 <dt><i>alignment</i> (Qt.AlignmentFlag)</dt>
247 <dd> 247 <dd>
248 alignment type (Qt.AlignmentFlag) 248 alignment type
249 </dd> 249 </dd>
250 </dl> 250 </dl>
251 <a NAME="UMLGraphicsView.__checkSizeActions" ID="UMLGraphicsView.__checkSizeActions"></a> 251 <a NAME="UMLGraphicsView.__checkSizeActions" ID="UMLGraphicsView.__checkSizeActions"></a>
252 <h4>UMLGraphicsView.__checkSizeActions</h4> 252 <h4>UMLGraphicsView.__checkSizeActions</h4>
253 <b>__checkSizeActions</b>(<i></i>) 253 <b>__checkSizeActions</b>(<i></i>)
304 <p> 304 <p>
305 Private method to calculate the bounding rectangle of the given items. 305 Private method to calculate the bounding rectangle of the given items.
306 </p> 306 </p>
307 <dl> 307 <dl>
308 308
309 <dt><i>items</i></dt> 309 <dt><i>items</i> (list of UMLItem)</dt>
310 <dd> 310 <dd>
311 list of items to operate on (list of UMLItem) 311 list of items to operate on
312 </dd> 312 </dd>
313 </dl> 313 </dl>
314 <dl> 314 <dl>
315 <dt>Return:</dt> 315 <dt>Return:</dt>
316 <dd> 316 <dd>
317 bounding rectangle (QRectF) 317 bounding rectangle
318 </dd>
319 </dl>
320 <dl>
321 <dt>Return Type:</dt>
322 <dd>
323 QRectF
318 </dd> 324 </dd>
319 </dl> 325 </dl>
320 <a NAME="UMLGraphicsView.__printPreviewPrint" ID="UMLGraphicsView.__printPreviewPrint"></a> 326 <a NAME="UMLGraphicsView.__printPreviewPrint" ID="UMLGraphicsView.__printPreviewPrint"></a>
321 <h4>UMLGraphicsView.__printPreviewPrint</h4> 327 <h4>UMLGraphicsView.__printPreviewPrint</h4>
322 <b>__printPreviewPrint</b>(<i>printer</i>) 328 <b>__printPreviewPrint</b>(<i>printer</i>)
324 <p> 330 <p>
325 Private slot to generate a print preview. 331 Private slot to generate a print preview.
326 </p> 332 </p>
327 <dl> 333 <dl>
328 334
329 <dt><i>printer</i></dt> 335 <dt><i>printer</i> (QPrinter)</dt>
330 <dd> 336 <dd>
331 reference to the printer object (QPrinter) 337 reference to the printer object
332 </dd> 338 </dd>
333 </dl> 339 </dl>
334 <a NAME="UMLGraphicsView.__relayout" ID="UMLGraphicsView.__relayout"></a> 340 <a NAME="UMLGraphicsView.__relayout" ID="UMLGraphicsView.__relayout"></a>
335 <h4>UMLGraphicsView.__relayout</h4> 341 <h4>UMLGraphicsView.__relayout</h4>
336 <b>__relayout</b>(<i></i>) 342 <b>__relayout</b>(<i></i>)
352 <p> 358 <p>
353 Private slot called when the scene changes. 359 Private slot called when the scene changes.
354 </p> 360 </p>
355 <dl> 361 <dl>
356 362
357 <dt><i>areas</i></dt> 363 <dt><i>areas</i> (list of QRectF)</dt>
358 <dd> 364 <dd>
359 list of rectangles that contain changes (list of QRectF) 365 list of rectangles that contain changes
360 </dd> 366 </dd>
361 </dl> 367 </dl>
362 <a NAME="UMLGraphicsView.__setSize" ID="UMLGraphicsView.__setSize"></a> 368 <a NAME="UMLGraphicsView.__setSize" ID="UMLGraphicsView.__setSize"></a>
363 <h4>UMLGraphicsView.__setSize</h4> 369 <h4>UMLGraphicsView.__setSize</h4>
364 <b>__setSize</b>(<i></i>) 370 <b>__setSize</b>(<i></i>)
373 <p> 379 <p>
374 Public method to adjust the scene size to the diagram size. 380 Public method to adjust the scene size to the diagram size.
375 </p> 381 </p>
376 <dl> 382 <dl>
377 383
378 <dt><i>limit</i></dt> 384 <dt><i>limit</i> (bool)</dt>
379 <dd> 385 <dd>
380 flag indicating to limit the scene to the 386 flag indicating to limit the scene to the
381 initial size (boolean) 387 initial size
382 </dd> 388 </dd>
383 </dl> 389 </dl>
384 <a NAME="UMLGraphicsView.event" ID="UMLGraphicsView.event"></a> 390 <a NAME="UMLGraphicsView.event" ID="UMLGraphicsView.event"></a>
385 <h4>UMLGraphicsView.event</h4> 391 <h4>UMLGraphicsView.event</h4>
386 <b>event</b>(<i>evt</i>) 392 <b>event</b>(<i>evt</i>)
388 <p> 394 <p>
389 Public method handling events. 395 Public method handling events.
390 </p> 396 </p>
391 <dl> 397 <dl>
392 398
393 <dt><i>evt</i></dt> 399 <dt><i>evt</i> (QEvent)</dt>
394 <dd> 400 <dd>
395 reference to the event (QEvent) 401 reference to the event
396 </dd> 402 </dd>
397 </dl> 403 </dl>
398 <dl> 404 <dl>
399 <dt>Return:</dt> 405 <dt>Return:</dt>
400 <dd> 406 <dd>
401 flag indicating, if the event was handled (boolean) 407 flag indicating, if the event was handled
408 </dd>
409 </dl>
410 <dl>
411 <dt>Return Type:</dt>
412 <dd>
413 bool
402 </dd> 414 </dd>
403 </dl> 415 </dl>
404 <a NAME="UMLGraphicsView.filteredItems" ID="UMLGraphicsView.filteredItems"></a> 416 <a NAME="UMLGraphicsView.filteredItems" ID="UMLGraphicsView.filteredItems"></a>
405 <h4>UMLGraphicsView.filteredItems</h4> 417 <h4>UMLGraphicsView.filteredItems</h4>
406 <b>filteredItems</b>(<i>items, itemType=UMLItem</i>) 418 <b>filteredItems</b>(<i>items, itemType=UMLItem</i>)
408 <p> 420 <p>
409 Public method to filter a list of items. 421 Public method to filter a list of items.
410 </p> 422 </p>
411 <dl> 423 <dl>
412 424
413 <dt><i>items</i></dt> 425 <dt><i>items</i> (QGraphicsItem)</dt>
414 <dd> 426 <dd>
415 list of items as returned by the scene object 427 list of items as returned by the scene object
416 (QGraphicsItem) 428 </dd>
417 </dd> 429 <dt><i>itemType</i> (class)</dt>
418 <dt><i>itemType</i></dt> 430 <dd>
419 <dd> 431 type to be filtered
420 type to be filtered (class) 432 </dd>
421 </dd> 433 </dl>
422 </dl> 434 <dl>
423 <dl> 435 <dt>Return:</dt>
424 <dt>Return:</dt> 436 <dd>
425 <dd> 437 list of interesting collision items
426 list of interesting collision items (QGraphicsItem) 438 </dd>
439 </dl>
440 <dl>
441 <dt>Return Type:</dt>
442 <dd>
443 QGraphicsItem
427 </dd> 444 </dd>
428 </dl> 445 </dl>
429 <a NAME="UMLGraphicsView.findItem" ID="UMLGraphicsView.findItem"></a> 446 <a NAME="UMLGraphicsView.findItem" ID="UMLGraphicsView.findItem"></a>
430 <h4>UMLGraphicsView.findItem</h4> 447 <h4>UMLGraphicsView.findItem</h4>
431 <b>findItem</b>(<i>itemId</i>) 448 <b>findItem</b>(<i>itemId</i>)
433 <p> 450 <p>
434 Public method to find an UML item based on the ID. 451 Public method to find an UML item based on the ID.
435 </p> 452 </p>
436 <dl> 453 <dl>
437 454
438 <dt><i>itemId</i></dt> 455 <dt><i>itemId</i> (int)</dt>
439 <dd> 456 <dd>
440 of the item to search for (integer) 457 of the item to search for
441 </dd> 458 </dd>
442 </dl> 459 </dl>
443 <dl> 460 <dl>
444 <dt>Return:</dt> 461 <dt>Return:</dt>
445 <dd> 462 <dd>
446 item found (UMLItem) or None 463 item found or None
464 </dd>
465 </dl>
466 <dl>
467 <dt>Return Type:</dt>
468 <dd>
469 UMLItem
447 </dd> 470 </dd>
448 </dl> 471 </dl>
449 <a NAME="UMLGraphicsView.findItemByName" ID="UMLGraphicsView.findItemByName"></a> 472 <a NAME="UMLGraphicsView.findItemByName" ID="UMLGraphicsView.findItemByName"></a>
450 <h4>UMLGraphicsView.findItemByName</h4> 473 <h4>UMLGraphicsView.findItemByName</h4>
451 <b>findItemByName</b>(<i>name</i>) 474 <b>findItemByName</b>(<i>name</i>)
453 <p> 476 <p>
454 Public method to find an UML item based on its name. 477 Public method to find an UML item based on its name.
455 </p> 478 </p>
456 <dl> 479 <dl>
457 480
458 <dt><i>name</i></dt> 481 <dt><i>name</i> (str)</dt>
459 <dd> 482 <dd>
460 name to look for (string) 483 name to look for
461 </dd> 484 </dd>
462 </dl> 485 </dl>
463 <dl> 486 <dl>
464 <dt>Return:</dt> 487 <dt>Return:</dt>
465 <dd> 488 <dd>
466 item found (UMLItem) or None 489 item found or None
490 </dd>
491 </dl>
492 <dl>
493 <dt>Return Type:</dt>
494 <dd>
495 UMLItem
467 </dd> 496 </dd>
468 </dl> 497 </dl>
469 <a NAME="UMLGraphicsView.gestureEvent" ID="UMLGraphicsView.gestureEvent"></a> 498 <a NAME="UMLGraphicsView.gestureEvent" ID="UMLGraphicsView.gestureEvent"></a>
470 <h4>UMLGraphicsView.gestureEvent</h4> 499 <h4>UMLGraphicsView.gestureEvent</h4>
471 <b>gestureEvent</b>(<i>evt</i>) 500 <b>gestureEvent</b>(<i>evt</i>)
473 <p> 502 <p>
474 Protected method handling gesture events. 503 Protected method handling gesture events.
475 </p> 504 </p>
476 <dl> 505 <dl>
477 506
478 <dt><i>evt</i></dt> 507 <dt><i>evt</i> (QGestureEvent)</dt>
479 <dd> 508 <dd>
480 reference to the gesture event (QGestureEvent 509 reference to the gesture event
481 </dd> 510 </dd>
482 </dl> 511 </dl>
483 <a NAME="UMLGraphicsView.getItemId" ID="UMLGraphicsView.getItemId"></a> 512 <a NAME="UMLGraphicsView.getItemId" ID="UMLGraphicsView.getItemId"></a>
484 <h4>UMLGraphicsView.getItemId</h4> 513 <h4>UMLGraphicsView.getItemId</h4>
485 <b>getItemId</b>(<i></i>) 514 <b>getItemId</b>(<i></i>)
488 Public method to get the ID to be assigned to an item. 517 Public method to get the ID to be assigned to an item.
489 </p> 518 </p>
490 <dl> 519 <dl>
491 <dt>Return:</dt> 520 <dt>Return:</dt>
492 <dd> 521 <dd>
493 item ID (integer) 522 item ID
523 </dd>
524 </dl>
525 <dl>
526 <dt>Return Type:</dt>
527 <dd>
528 int
494 </dd> 529 </dd>
495 </dl> 530 </dl>
496 <a NAME="UMLGraphicsView.getPersistenceData" ID="UMLGraphicsView.getPersistenceData"></a> 531 <a NAME="UMLGraphicsView.getPersistenceData" ID="UMLGraphicsView.getPersistenceData"></a>
497 <h4>UMLGraphicsView.getPersistenceData</h4> 532 <h4>UMLGraphicsView.getPersistenceData</h4>
498 <b>getPersistenceData</b>(<i></i>) 533 <b>getPersistenceData</b>(<i></i>)
501 Public method to get a list of data to be persisted. 536 Public method to get a list of data to be persisted.
502 </p> 537 </p>
503 <dl> 538 <dl>
504 <dt>Return:</dt> 539 <dt>Return:</dt>
505 <dd> 540 <dd>
506 list of data to be persisted (list of strings) 541 list of data to be persisted
542 </dd>
543 </dl>
544 <dl>
545 <dt>Return Type:</dt>
546 <dd>
547 list of str
507 </dd> 548 </dd>
508 </dl> 549 </dl>
509 <a NAME="UMLGraphicsView.initToolBar" ID="UMLGraphicsView.initToolBar"></a> 550 <a NAME="UMLGraphicsView.initToolBar" ID="UMLGraphicsView.initToolBar"></a>
510 <h4>UMLGraphicsView.initToolBar</h4> 551 <h4>UMLGraphicsView.initToolBar</h4>
511 <b>initToolBar</b>(<i></i>) 552 <b>initToolBar</b>(<i></i>)
514 Public method to populate a toolbar with our actions. 555 Public method to populate a toolbar with our actions.
515 </p> 556 </p>
516 <dl> 557 <dl>
517 <dt>Return:</dt> 558 <dt>Return:</dt>
518 <dd> 559 <dd>
519 the populated toolBar (QToolBar) 560 the populated toolBar
561 </dd>
562 </dl>
563 <dl>
564 <dt>Return Type:</dt>
565 <dd>
566 QToolBar
520 </dd> 567 </dd>
521 </dl> 568 </dl>
522 <a NAME="UMLGraphicsView.keyPressEvent" ID="UMLGraphicsView.keyPressEvent"></a> 569 <a NAME="UMLGraphicsView.keyPressEvent" ID="UMLGraphicsView.keyPressEvent"></a>
523 <h4>UMLGraphicsView.keyPressEvent</h4> 570 <h4>UMLGraphicsView.keyPressEvent</h4>
524 <b>keyPressEvent</b>(<i>evt</i>) 571 <b>keyPressEvent</b>(<i>evt</i>)
526 <p> 573 <p>
527 Protected method handling key press events. 574 Protected method handling key press events.
528 </p> 575 </p>
529 <dl> 576 <dl>
530 577
531 <dt><i>evt</i></dt> 578 <dt><i>evt</i> (QKeyEvent)</dt>
532 <dd> 579 <dd>
533 reference to the key event (QKeyEvent) 580 reference to the key event
534 </dd> 581 </dd>
535 </dl> 582 </dl>
536 <a NAME="UMLGraphicsView.parsePersistenceData" ID="UMLGraphicsView.parsePersistenceData"></a> 583 <a NAME="UMLGraphicsView.parsePersistenceData" ID="UMLGraphicsView.parsePersistenceData"></a>
537 <h4>UMLGraphicsView.parsePersistenceData</h4> 584 <h4>UMLGraphicsView.parsePersistenceData</h4>
538 <b>parsePersistenceData</b>(<i>version, data</i>) 585 <b>parsePersistenceData</b>(<i>version, data</i>)
540 <p> 587 <p>
541 Public method to parse persisted data. 588 Public method to parse persisted data.
542 </p> 589 </p>
543 <dl> 590 <dl>
544 591
545 <dt><i>version</i></dt> 592 <dt><i>version</i> (str)</dt>
546 <dd> 593 <dd>
547 version of the data (string) 594 version of the data
548 </dd> 595 </dd>
549 <dt><i>data</i></dt> 596 <dt><i>data</i> (list of str)</dt>
550 <dd> 597 <dd>
551 persisted data to be parsed (list of string) 598 persisted data to be parsed
552 </dd> 599 </dd>
553 </dl> 600 </dl>
554 <dl> 601 <dl>
555 <dt>Return:</dt> 602 <dt>Return:</dt>
556 <dd> 603 <dd>
557 tuple of flag indicating success (boolean) and faulty line 604 tuple of flag indicating success (boolean) and faulty line
558 number (integer) 605 number
606 </dd>
607 </dl>
608 <dl>
609 <dt>Return Type:</dt>
610 <dd>
611 int
559 </dd> 612 </dd>
560 </dl> 613 </dl>
561 <a NAME="UMLGraphicsView.printDiagram" ID="UMLGraphicsView.printDiagram"></a> 614 <a NAME="UMLGraphicsView.printDiagram" ID="UMLGraphicsView.printDiagram"></a>
562 <h4>UMLGraphicsView.printDiagram</h4> 615 <h4>UMLGraphicsView.printDiagram</h4>
563 <b>printDiagram</b>(<i></i>) 616 <b>printDiagram</b>(<i></i>)
586 <p> 639 <p>
587 Public method to select an item. 640 Public method to select an item.
588 </p> 641 </p>
589 <dl> 642 <dl>
590 643
591 <dt><i>item</i></dt> 644 <dt><i>item</i> (QGraphicsItemItem)</dt>
592 <dd> 645 <dd>
593 item to be selected (QGraphicsItemItem) 646 item to be selected
594 </dd> 647 </dd>
595 </dl> 648 </dl>
596 <a NAME="UMLGraphicsView.selectItems" ID="UMLGraphicsView.selectItems"></a> 649 <a NAME="UMLGraphicsView.selectItems" ID="UMLGraphicsView.selectItems"></a>
597 <h4>UMLGraphicsView.selectItems</h4> 650 <h4>UMLGraphicsView.selectItems</h4>
598 <b>selectItems</b>(<i>items</i>) 651 <b>selectItems</b>(<i>items</i>)
600 <p> 653 <p>
601 Public method to select the given items. 654 Public method to select the given items.
602 </p> 655 </p>
603 <dl> 656 <dl>
604 657
605 <dt><i>items</i></dt> 658 <dt><i>items</i> (list of QGraphicsItemItem)</dt>
606 <dd> 659 <dd>
607 list of items to be selected (list of QGraphicsItemItem) 660 list of items to be selected
608 </dd> 661 </dd>
609 </dl> 662 </dl>
610 <a NAME="UMLGraphicsView.setDiagramName" ID="UMLGraphicsView.setDiagramName"></a> 663 <a NAME="UMLGraphicsView.setDiagramName" ID="UMLGraphicsView.setDiagramName"></a>
611 <h4>UMLGraphicsView.setDiagramName</h4> 664 <h4>UMLGraphicsView.setDiagramName</h4>
612 <b>setDiagramName</b>(<i>name</i>) 665 <b>setDiagramName</b>(<i>name</i>)
614 <p> 667 <p>
615 Public slot to set the diagram name. 668 Public slot to set the diagram name.
616 </p> 669 </p>
617 <dl> 670 <dl>
618 671
619 <dt><i>name</i></dt> 672 <dt><i>name</i> (str)</dt>
620 <dd> 673 <dd>
621 diagram name (string) 674 diagram name
622 </dd> 675 </dd>
623 </dl> 676 </dl>
624 <a NAME="UMLGraphicsView.wheelEvent" ID="UMLGraphicsView.wheelEvent"></a> 677 <a NAME="UMLGraphicsView.wheelEvent" ID="UMLGraphicsView.wheelEvent"></a>
625 <h4>UMLGraphicsView.wheelEvent</h4> 678 <h4>UMLGraphicsView.wheelEvent</h4>
626 <b>wheelEvent</b>(<i>evt</i>) 679 <b>wheelEvent</b>(<i>evt</i>)
628 <p> 681 <p>
629 Protected method to handle wheel events. 682 Protected method to handle wheel events.
630 </p> 683 </p>
631 <dl> 684 <dl>
632 685
633 <dt><i>evt</i></dt> 686 <dt><i>evt</i> (QWheelEvent)</dt>
634 <dd> 687 <dd>
635 reference to the wheel event (QWheelEvent) 688 reference to the wheel event
636 </dd> 689 </dd>
637 </dl> 690 </dl>
638 <div align="right"><a href="#top">Up</a></div> 691 <div align="right"><a href="#top">Up</a></div>
639 <hr /> 692 <hr />
640 </body></html> 693 </body></html>

eric ide

mercurial