# eric4.E4Graphics.E4ArrowItem

Module implementing a graphics item subclass for an arrow.

### Global Attributes

ArrowheadAngleFactor
NormalArrow
WideArrow

### Classes

E4ArrowItem | Class implementing an arrow graphics item subclass.

### Functions

None

## E4ArrowItem

Class implementing an arrow graphics item subclass.

### Derived from

QAbstractGraphicsShapeItem

### Class Attributes

None

### Class Methods

None

### Methods

E4ArrowItem | Constructor
boundingRect | Public method to return the bounding rectangle.
paint | Public method to paint the item in local coordinates.
setEndPoint | Public method to set the end point.
setPoints | Public method to set the start and end points of the line.
setStartPoint | Public method to set the start point.

### Static Methods

None

#### E4ArrowItem (Constructor)

E4ArrowItem(origin = QPointF(), end = QPointF(), filled = False, type = NormalArrow, parent = None)

Constructor

origin
  origin of the arrow (QPointF)
end
  end point of the arrow (QPointF)
filled
  flag indicating a filled arrow head (boolean)
type
  arrow type (NormalArrow, WideArrow)
parent=
  reference to the parent object (QGraphicsItem)

#### E4ArrowItem.boundingRect

boundingRect()

Public method to return the bounding rectangle.

Returns:
  bounding rectangle (QRectF)

#### E4ArrowItem.paint

paint(painter, option, widget = None)

Public method to paint the item in local coordinates.

painter
  reference to the painter object (QPainter)
option
  style options (QStyleOptionGraphicsItem)
widget
  optional reference to the widget painted on (QWidget)

#### E4ArrowItem.setEndPoint

setEndPoint(x, y)

Public method to set the end point.

Note: This method does not redraw the item.

x
  x-coordinate of the end point (float)
y
  y-coordinate of the end point (float)

#### E4ArrowItem.setPoints

setPoints(xa, ya, xb, yb)

Public method to set the start and end points of the line.

Note: This method does not redraw the item.

xa
  x-coordinate of the start point (float)
ya
  y-coordinate of the start point (float)
xb
  x-coordinate of the end point (float)
yb
  y-coordinate of the end point (float)

#### E4ArrowItem.setStartPoint

setStartPoint(x, y)

Public method to set the start point.

Note: This method does not redraw the item.

x
  x-coordinate of the start point (float)
y
  y-coordinate of the start point (float)

Up