Class: QgsLayoutItemPolygon

class qgis.core.QgsLayoutItemPolygon(layout: QgsLayout)

Bases: QgsLayoutNodesItem

Constructor for QgsLayoutItemPolygon for the specified layout.

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

Layout item for node based polygon shapes.

New in version 3.0.

Parameters

layout

accept(self, visitor: QgsStyleEntityVisitorInterface) → bool
Parameters

visitor (QgsStyleEntityVisitorInterface) –

Return type

bool

adjustPointForReferencePosition()
applyDataDefinedSize()
applyItemSizeConstraint()
childEvent()
computeDistance()
connectNotify()
contextMenuEvent()
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()
disconnectNotify()
displayName(self) → str
Return type

str

dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
draw()
drawBackground()
drawDebugRect()
drawFrame()
dropEvent()
focusInEvent()
focusOutEvent()
hoverEnterEvent()
hoverLeaveEvent()
hoverMoveEvent()
icon(self) → QIcon
Return type

QIcon

inputMethodEvent()
inputMethodQuery()
isSignalConnected()
itemChange()
keyPressEvent()
keyReleaseEvent()
mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
positionAtReferencePoint()
prepareGeometryChange()
readObjectPropertiesFromElement()
readPropertiesFromElement()
receivers()
refreshBackgroundColor()
refreshBlendMode()
refreshFrame()
refreshItemPosition()
refreshItemRotation()
refreshItemSize()
refreshOpacity()
rescaleToFitBoundingBox()
sceneEvent()
sceneEventFilter()
sender()
senderSignalIndex()
setFixedSize()
setMinimumSize()
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()
topLeftToReferencePoint()
type(self) → int
Return type

int

updateBoundingRect()
updateMicroFocus()
updateSceneRect()
wheelEvent()
writeObjectPropertiesToElement()
writePropertiesToElement()