Class: QgsLayoutFrame

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

Bases: 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.

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

Creates a new QgsLayoutFrame belonging to the specified layout.

Parameters

layout (QgsLayout) –

Return type

QgsLayoutFrame

createExpressionContext(self) → QgsExpressionContext
Return type

QgsExpressionContext

customEvent()
disconnectNotify()
displayName(self) → str
Return type

str

dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
draw(self, context: QgsLayoutItemRenderContext)
Parameters

context (QgsLayoutItemRenderContext) –

drawBackground(self, context: QgsRenderContext)
Parameters

context (QgsRenderContext) –

drawDebugRect()
drawFrame(self, context: QgsRenderContext)
Parameters

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.

Return type

QRectF

fixedSize(self) → QgsLayoutSize
Return type

QgsLayoutSize

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

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

Return type

bool

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

Return type

bool

Returns

true if page should be hidden if frame is empty

hoverEnterEvent()
hoverLeaveEvent()
hoverMoveEvent()
icon(self) → QIcon
Return type

QIcon

inputMethodEvent()
inputMethodQuery()
isEmpty(self) → bool

Returns whether the frame is empty.

Return type

bool

isSignalConnected()
itemChange()
keyPressEvent()
keyReleaseEvent()
minimumSize(self) → QgsLayoutSize
Return type

QgsLayoutSize

mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
multiFrame(self) → QgsLayoutMultiFrame

Returns the parent multiframe for the frame.

Return type

QgsLayoutMultiFrame

positionAtReferencePoint()
prepareGeometryChange()
readObjectPropertiesFromElement()
readPropertiesFromElement(self, itemElement: QDomElement, document: QDomDocument, context: QgsReadWriteContext) → bool
Parameters
Return type

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()

Parameters

section (QRectF) –

setFixedSize()
setHideBackgroundIfEmpty(self, hideBackgroundIfEmpty: bool)

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

Parameters

hideBackgroundIfEmpty (bool) – 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 (bool) – set to true if page should be hidden if frame is empty

setMinimumSize()
timerEvent()
topLeftToReferencePoint()
type(self) → int
Return type

int

updateMicroFocus()
wheelEvent()
writeObjectPropertiesToElement()
writePropertiesToElement(self, parentElement: QDomElement, document: QDomDocument, context: QgsReadWriteContext) → bool
Parameters
  • parentElement (QDomElement) –

  • document (QDomDocument) –

  • context (QgsReadWriteContext) –

Return type

bool