eric4.Graphics.UMLGraphicsView

Module implementing a subclass of E4GraphicsView for our diagrams.

Global Attributes

None

Classes

UMLGraphicsView Class implementing a specialized E4GraphicsView for our diagrams.

Functions

None


UMLGraphicsView

Class implementing a specialized E4GraphicsView for our diagrams.

Signals

relayout()
emitted to indicate a relayout of the diagram is requested

Derived from

E4GraphicsView

Class Attributes

None

Class Methods

None

Methods

UMLGraphicsView Constructor
__alignShapes Private slot to align the selected shapes.
__checkSizeActions Private slot to set the enabled state of the size actions.
__decHeight Private method to handle the decrease height context menu entry.
__decWidth Private method to handle the decrease width context menu entry.
__deleteShape Private method to delete the selected shapes from the display.
__incHeight Private method to handle the increase height context menu entry.
__incWidth Private method to handle the increase width context menu entry.
__initActions Private method to initialize the view actions.
__printDiagram Private slot called to print the diagram.
__printPreviewDiagram Private slot called to show a print preview of the diagram.
__relayout Private method to handle the re-layout context menu entry.
__saveImage Private method to handle the save context menu entry.
__sceneChanged Private slot called when the scene changes.
__setSize Private method to handle the set size context menu entry.
__zoom Private method to handle the zoom context menu action.
filteredItems Public method to filter a list of items.
initToolBar Public method to populate a toolbar with our actions.
selectItem Public method to select an item.
selectItems Public method to select the given items.
setDiagramName Public slot to set the diagram name.

Static Methods

None

UMLGraphicsView (Constructor)

UMLGraphicsView(scene, diagramName = "Unnamed", parent = None, name = None)

Constructor

scene
reference to the scene object (QGraphicsScene)
diagramName
name of the diagram (string or QString)
parent
parent widget of the view (QWidget)
name
name of the view widget (QString or string)

UMLGraphicsView.__alignShapes

__alignShapes(alignment)

Private slot to align the selected shapes.

alignment
alignment type (Qt.AlignmentFlag)

UMLGraphicsView.__checkSizeActions

__checkSizeActions()

Private slot to set the enabled state of the size actions.

UMLGraphicsView.__decHeight

__decHeight()

Private method to handle the decrease height context menu entry.

UMLGraphicsView.__decWidth

__decWidth()

Private method to handle the decrease width context menu entry.

UMLGraphicsView.__deleteShape

__deleteShape()

Private method to delete the selected shapes from the display.

UMLGraphicsView.__incHeight

__incHeight()

Private method to handle the increase height context menu entry.

UMLGraphicsView.__incWidth

__incWidth()

Private method to handle the increase width context menu entry.

UMLGraphicsView.__initActions

__initActions()

Private method to initialize the view actions.

UMLGraphicsView.__printDiagram

__printDiagram()

Private slot called to print the diagram.

UMLGraphicsView.__printPreviewDiagram

__printPreviewDiagram()

Private slot called to show a print preview of the diagram.

UMLGraphicsView.__relayout

__relayout()

Private method to handle the re-layout context menu entry.

UMLGraphicsView.__saveImage

__saveImage()

Private method to handle the save context menu entry.

UMLGraphicsView.__sceneChanged

__sceneChanged(areas)

Private slot called when the scene changes.

areas
list of rectangles that contain changes (list of QRectF)

UMLGraphicsView.__setSize

__setSize()

Private method to handle the set size context menu entry.

UMLGraphicsView.__zoom

__zoom()

Private method to handle the zoom context menu action.

UMLGraphicsView.filteredItems

filteredItems(items)

Public method to filter a list of items.

items
list of items as returned by the scene object (QGraphicsItem)
Returns:
list of interesting collision items (QGraphicsItem)

UMLGraphicsView.initToolBar

initToolBar()

Public method to populate a toolbar with our actions.

Returns:
the populated toolBar (QToolBar)

UMLGraphicsView.selectItem

selectItem(item)

Public method to select an item.

item
item to be selected (QGraphicsItemItem)

UMLGraphicsView.selectItems

selectItems(items)

Public method to select the given items.

items
list of items to be selected (list of QGraphicsItemItem)

UMLGraphicsView.setDiagramName

setDiagramName(name)

Public slot to set the diagram name.

name
diagram name (string or QString)
Up