Class: QgsLayoutItemPolygon

class qgis.core.QgsLayoutItemPolygon

Bases: QgsLayoutNodesItem

Layout item for node based polygon shapes.

New in version 3.0.

QgsLayoutItemPolygon(layout: QgsLayout) Constructor for QgsLayoutItemPolygon for the specified layout.

QgsLayoutItemPolygon(polygon: QPolygonF, layout: QgsLayout) Constructor for QgsLayoutItemPolygon for the specified polygon and layout.

Methods

accept

param visitor

childEvent

clipPath

rtype

QgsGeometry

connectNotify

contextMenuEvent

create

Returns a new polygon item for the specified layout.

customEvent

disconnectNotify

displayName

rtype

str

dragEnterEvent

dragLeaveEvent

dragMoveEvent

dropEvent

focusInEvent

focusOutEvent

hoverEnterEvent

hoverLeaveEvent

hoverMoveEvent

icon

rtype

QIcon

inputMethodEvent

inputMethodQuery

isSignalConnected

itemChange

itemFlags

rtype

QgsLayoutItem.Flags

keyPressEvent

keyReleaseEvent

mouseDoubleClickEvent

mouseMoveEvent

mousePressEvent

mouseReleaseEvent

prepareGeometryChange

receivers

sceneEvent

sceneEventFilter

sender

senderSignalIndex

setSymbol

Sets the symbol used to draw the shape.

symbol

Returns the fill symbol used to draw the shape.

timerEvent

type

rtype

int

updateBoundingRect

Called when the bounding rect of the item should recalculated.

updateMicroFocus

wheelEvent

accept(self, visitor: QgsStyleEntityVisitorInterface) bool
Parameters

visitor (QgsStyleEntityVisitorInterface) –

Return type

bool

childEvent(self, QChildEvent)
clipPath(self) QgsGeometry
Return type

QgsGeometry

connectNotify(self, QMetaMethod)
contextMenuEvent(self, QGraphicsSceneContextMenuEvent)
create(layout: QgsLayout) QgsLayoutItemPolygon

Returns a new polygon item for the specified layout.

The caller takes responsibility for deleting the returned object.

Parameters

layout (QgsLayout) –

Return type

QgsLayoutItemPolygon

customEvent(self, QEvent)
disconnectNotify(self, QMetaMethod)
displayName(self) str
Return type

str

dragEnterEvent(self, QGraphicsSceneDragDropEvent)
dragLeaveEvent(self, QGraphicsSceneDragDropEvent)
dragMoveEvent(self, QGraphicsSceneDragDropEvent)
dropEvent(self, QGraphicsSceneDragDropEvent)
focusInEvent(self, QFocusEvent)
focusOutEvent(self, QFocusEvent)
hoverEnterEvent(self, QGraphicsSceneHoverEvent)
hoverLeaveEvent(self, QGraphicsSceneHoverEvent)
hoverMoveEvent(self, QGraphicsSceneHoverEvent)
icon(self) QIcon
Return type

QIcon

inputMethodEvent(self, QInputMethodEvent)
inputMethodQuery(self, Qt.InputMethodQuery) Any
isSignalConnected(self, QMetaMethod) bool
itemChange(self, QGraphicsItem.GraphicsItemChange, Any) Any
itemFlags(self) QgsLayoutItem.Flags
Return type

QgsLayoutItem.Flags

keyPressEvent(self, QKeyEvent)
keyReleaseEvent(self, QKeyEvent)
mouseDoubleClickEvent(self, QGraphicsSceneMouseEvent)
mouseMoveEvent(self, QGraphicsSceneMouseEvent)
mousePressEvent(self, QGraphicsSceneMouseEvent)
mouseReleaseEvent(self, QGraphicsSceneMouseEvent)
prepareGeometryChange(self)
receivers(self, PYQT_SIGNAL) int
sceneEvent(self, QEvent) bool
sceneEventFilter(self, QGraphicsItem, QEvent) bool
sender(self) QObject
senderSignalIndex(self) int
setSymbol(self, symbol: QgsFillSymbol)

Sets the symbol used to draw the shape. Ownership of symbol is not transferred.

See also

symbol()

Parameters

symbol (QgsFillSymbol) –

symbol(self) QgsFillSymbol

Returns the fill symbol used to draw the shape.

See also

setSymbol()

Return type

QgsFillSymbol

timerEvent(self, QTimerEvent)
type(self) int
Return type

int

updateBoundingRect(self)

Called when the bounding rect of the item should recalculated. Subclasses should update currentRectangle in their implementations.

updateMicroFocus(self)
wheelEvent(self, QGraphicsSceneWheelEvent)