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).
New in version 3.0: Enums
Methods
Returns the corner radius for rounded rectangle corners.
Returns a new shape item for the specified
layout
.Sets the corner
radius
for rounded rectangle corners.Sets the
type
of shape (e.g.Sets the fill
symbol
used to draw the shape.Returns the type of shape (e.g.
Returns the fill symbol used to draw the shape.
Signals
Attributes
-
Ellipse
= 0¶
-
Rectangle
= 1¶
-
class
Shape
¶ Bases:
int
-
Triangle
= 2¶
-
adjustPointForReferencePosition
()¶
-
applyDataDefinedSize
()¶
-
applyItemSizeConstraint
()¶
-
boundingRect
(self) → QRectF¶
-
childEvent
()¶
-
connectNotify
()¶
-
contextMenuEvent
()¶
-
cornerRadius
(self) → QgsLayoutMeasurement¶ Returns the corner radius for rounded rectangle corners.
See also
-
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
-
setFixedSize
()¶
-
setMinimumSize
()¶
-
setShapeType
(self, type: QgsLayoutItemShape.Shape)¶ Sets the
type
of shape (e.g. rectangle, ellipse, etc).See also
-
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
-
shapeType
(self) → QgsLayoutItemShape.Shape¶ Returns the type of shape (e.g. rectangle, ellipse, etc).
See also
-
symbol
(self) → QgsFillSymbol¶ Returns the fill symbol used to draw the shape.
See also
-
timerEvent
()¶
-
topLeftToReferencePoint
()¶
-
type
(self) → int¶
-
updateMicroFocus
()¶
-
wheelEvent
()¶
-
writeObjectPropertiesToElement
()¶
-
writePropertiesToElement
(self, element: QDomElement, document: QDomDocument, context: QgsReadWriteContext) → bool¶
-