Class: QgsLayoutItemShape

class qgis.core.QgsLayoutItemShape(layout: QgsLayout)

Bases: qgis._core.QgsLayoutItem

Constructor for QgsLayoutItemShape, with the specified parent layout.

Layout item for basic filled shapes (e.g. rectangles, ellipses).

Ellipse = 0
Rectangle = 1
class Shape

Bases: int

Triangle = 2
accept(self, visitor: QgsStyleEntityVisitorInterface) → bool
adjustPointForReferencePosition()
applyDataDefinedSize()
applyItemSizeConstraint()
boundingRect(self) → QRectF
childEvent()
connectNotify()
contextMenuEvent()
cornerRadius(self) → QgsLayoutMeasurement

Returns the corner radius for rounded rectangle corners.

create(layout: QgsLayout) → QgsLayoutItemShape

Returns a new shape item for the specified layout.

The caller takes responsibility for deleting the returned object.

customEvent()
disconnectNotify()
displayName(self) → str
dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
draw(self, context: QgsLayoutItemRenderContext)
drawBackground()
drawDebugRect()
drawFrame()
dropEvent()
estimatedFrameBleed(self) → float
focusInEvent()
focusOutEvent()
hoverEnterEvent()
hoverLeaveEvent()
hoverMoveEvent()
icon(self) → QIcon
inputMethodEvent()
inputMethodQuery()
isSignalConnected()
itemChange()
keyPressEvent()
keyReleaseEvent()
mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
positionAtReferencePoint()
prepareGeometryChange()
readObjectPropertiesFromElement()
readPropertiesFromElement(self, element: QDomElement, document: QDomDocument, context: QgsReadWriteContext) → bool
receivers()
refreshBackgroundColor()
refreshBlendMode()
refreshFrame()
refreshItemPosition()
refreshItemRotation()
refreshItemSize()
refreshOpacity()
sceneEvent()
sceneEventFilter()
sender()
senderSignalIndex()
setCornerRadius(self, radius: QgsLayoutMeasurement)

Sets the corner radius for rounded rectangle corners.

See also

cornerRadius()

setFixedSize()
setMinimumSize()
setShapeType(self, type: QgsLayoutItemShape.Shape)

Sets the type of shape (e.g. rectangle, ellipse, etc).

See also

shapeType()

setSymbol(self, symbol: QgsFillSymbol)

Sets the fill symbol used to draw the shape. Ownership is not transferred and a clone of the symbol is made.

See also

symbol()

shapeType(self) → QgsLayoutItemShape.Shape

Returns the type of shape (e.g. rectangle, ellipse, etc).

See also

setShapeType()

symbol(self) → QgsFillSymbol

Returns the fill symbol used to draw the shape.

See also

setSymbol()

timerEvent()
topLeftToReferencePoint()
type(self) → int
updateMicroFocus()
wheelEvent()
writeObjectPropertiesToElement()
writePropertiesToElement(self, element: QDomElement, document: QDomDocument, context: QgsReadWriteContext) → bool