Class: QgsLayoutFrame

class qgis.core.QgsLayoutFrame(layout: QgsLayout, multiFrame: QgsLayoutMultiFrame)

Bases: qgis._core.QgsLayoutItem

Constructor for QgsLayoutFrame, with the specified parent layout and belonging to a multiFrame.

Base class for frame items, which form a layout multiframe item.

New in version 3.0: Enums

Methods

adjustPointForReferencePosition
applyDataDefinedSize
applyItemSizeConstraint
childEvent
cleanup
connectNotify
contextMenuEvent
create Creates a new QgsLayoutFrame belonging to the specified layout.
createExpressionContext
customEvent
disconnectNotify
displayName
dragEnterEvent
dragLeaveEvent
dragMoveEvent
draw
drawBackground
drawDebugRect
drawFrame
dropEvent
extent Returns the visible portion of the multi frame’s content which is shown in this frame, in layout units.
fixedSize
focusInEvent
focusOutEvent
hideBackgroundIfEmpty Returns whether the background and frame stroke should be hidden if this frame is empty
hidePageIfEmpty Returns whether the page should be hidden (ie, not included in layout exports) if this frame is empty
hoverEnterEvent
hoverLeaveEvent
hoverMoveEvent
icon
inputMethodEvent
inputMethodQuery
isEmpty Returns whether the frame is empty.
isSignalConnected
itemChange
keyPressEvent
keyReleaseEvent
minimumSize
mouseDoubleClickEvent
mouseMoveEvent
mousePressEvent
mouseReleaseEvent
multiFrame Returns the parent multiframe for the frame.
positionAtReferencePoint
prepareGeometryChange
readObjectPropertiesFromElement
readPropertiesFromElement
receivers
refreshBackgroundColor
refreshBlendMode
refreshFrame
refreshItemPosition
refreshItemRotation
refreshItemSize
refreshOpacity
sceneEvent
sceneEventFilter
sender
senderSignalIndex
setContentSection Sets the visible part of the multiframe’s content which is visible within this frame (relative to the total multiframe extent in layout units).
setFixedSize
setHideBackgroundIfEmpty Sets whether the background and frame stroke should be hidden if this frame is empty
setHidePageIfEmpty Sets whether the page should be hidden (ie, not included in layout exports) if this frame is empty
setMinimumSize
timerEvent
topLeftToReferencePoint
type
updateMicroFocus
wheelEvent
writeObjectPropertiesToElement
writePropertiesToElement

Signals

Attributes

adjustPointForReferencePosition()
applyDataDefinedSize()
applyItemSizeConstraint()
childEvent()
cleanup(self)
connectNotify()
contextMenuEvent()
create(layout: QgsLayout) → QgsLayoutFrame

Creates a new QgsLayoutFrame belonging to the specified layout.

createExpressionContext(self) → QgsExpressionContext
customEvent()
disconnectNotify()
displayName(self) → str
dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
draw(self, context: QgsLayoutItemRenderContext)
drawBackground(self, context: QgsRenderContext)
drawDebugRect()
drawFrame(self, context: QgsRenderContext)
dropEvent()
extent(self) → QRectF

Returns the visible portion of the multi frame’s content which is shown in this frame, in layout units.

fixedSize(self) → QgsLayoutSize
focusInEvent()
focusOutEvent()
hideBackgroundIfEmpty(self) → bool

Returns whether the background and frame stroke should be hidden if this frame is empty

Returns:True if background and stroke should be hidden if frame is empty
hidePageIfEmpty(self) → bool

Returns whether the page should be hidden (ie, not included in layout exports) if this frame is empty

Returns:True if page should be hidden if frame is empty
hoverEnterEvent()
hoverLeaveEvent()
hoverMoveEvent()
icon(self) → QIcon
inputMethodEvent()
inputMethodQuery()
isEmpty(self) → bool

Returns whether the frame is empty.

isSignalConnected()
itemChange()
keyPressEvent()
keyReleaseEvent()
minimumSize(self) → QgsLayoutSize
mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
multiFrame(self) → QgsLayoutMultiFrame

Returns the parent multiframe for the frame.

positionAtReferencePoint()
prepareGeometryChange()
readObjectPropertiesFromElement()
readPropertiesFromElement(self, itemElement: QDomElement, document: QDomDocument, context: QgsReadWriteContext) → bool
receivers()
refreshBackgroundColor()
refreshBlendMode()
refreshFrame()
refreshItemPosition()
refreshItemRotation()
refreshItemSize()
refreshOpacity()
sceneEvent()
sceneEventFilter()
sender()
senderSignalIndex()
setContentSection(self, section: QRectF)

Sets the visible part of the multiframe’s content which is visible within this frame (relative to the total multiframe extent in layout units).

See also

extent()

setFixedSize()
setHideBackgroundIfEmpty(self, hideBackgroundIfEmpty: bool)

Sets whether the background and frame stroke should be hidden if this frame is empty

Parameters:hideBackgroundIfEmpty – set to True if background and stroke should be hidden if frame is empty
setHidePageIfEmpty(self, hidePageIfEmpty: bool)

Sets whether the page should be hidden (ie, not included in layout exports) if this frame is empty

Parameters:hidePageIfEmpty – set to True if page should be hidden if frame is empty
setMinimumSize()
timerEvent()
topLeftToReferencePoint()
type(self) → int
updateMicroFocus()
wheelEvent()
writeObjectPropertiesToElement()
writePropertiesToElement(self, parentElement: QDomElement, document: QDomDocument, context: QgsReadWriteContext) → bool