Class: QgsPrintLayout

class qgis.core.QgsPrintLayout

Bases: QgsLayout, QgsMasterLayoutInterface

Print layout, a QgsLayout subclass for static or atlas-based layouts.

New in version 3.0.

QgsPrintLayout(project: QgsProject) Constructor for QgsPrintLayout.

Methods

atlas

Returns the print layout's atlas.

childEvent

clone

rtype

QgsPrintLayout

connectNotify

contextMenuEvent

createExpressionContext

rtype

QgsExpressionContext

customEvent

disconnectNotify

dragEnterEvent

dragLeaveEvent

dragMoveEvent

drawBackground

drawForeground

dropEvent

event

eventFilter

focusInEvent

focusNextPrevChild

focusOutEvent

helpEvent

icon

rtype

QIcon

inputMethodEvent

isSignalConnected

keyPressEvent

keyReleaseEvent

layoutAccept

param visitor

layoutProject

rtype

QgsProject

layoutType

rtype

QgsMasterLayoutInterface.Type

mouseDoubleClickEvent

mouseMoveEvent

mousePressEvent

mouseReleaseEvent

name

rtype

str

readLayoutXml

param layoutElement

readXml

param layoutElement

receivers

sender

senderSignalIndex

setName

param name

timerEvent

updateSettings

wheelEvent

writeLayoutXml

param document

writeXml

param document

Signals

nameChanged

Emitted when the layout's name is changed.

atlas(self) QgsLayoutAtlas

Returns the print layout’s atlas.

Return type

QgsLayoutAtlas

childEvent(self, QChildEvent)
clone(self) QgsPrintLayout
Return type

QgsPrintLayout

connectNotify(self, QMetaMethod)
contextMenuEvent(self, QGraphicsSceneContextMenuEvent)
createExpressionContext(self) QgsExpressionContext
Return type

QgsExpressionContext

customEvent(self, QEvent)
disconnectNotify(self, QMetaMethod)
dragEnterEvent(self, QGraphicsSceneDragDropEvent)
dragLeaveEvent(self, QGraphicsSceneDragDropEvent)
dragMoveEvent(self, QGraphicsSceneDragDropEvent)
drawBackground(self, QPainter, QRectF)
drawForeground(self, QPainter, QRectF)
dropEvent(self, QGraphicsSceneDragDropEvent)
event(self, QEvent) bool
eventFilter(self, QObject, QEvent) bool
focusInEvent(self, QFocusEvent)
focusNextPrevChild(self, bool) bool
focusOutEvent(self, QFocusEvent)
helpEvent(self, QGraphicsSceneHelpEvent)
icon(self) QIcon
Return type

QIcon

inputMethodEvent(self, QInputMethodEvent)
isSignalConnected(self, QMetaMethod) bool
keyPressEvent(self, QKeyEvent)
keyReleaseEvent(self, QKeyEvent)
layoutAccept(self, visitor: QgsStyleEntityVisitorInterface) bool
Parameters

visitor (QgsStyleEntityVisitorInterface) –

Return type

bool

layoutProject(self) QgsProject
Return type

QgsProject

layoutType(self) QgsMasterLayoutInterface.Type
Return type

QgsMasterLayoutInterface.Type

mouseDoubleClickEvent(self, QGraphicsSceneMouseEvent)
mouseMoveEvent(self, QGraphicsSceneMouseEvent)
mousePressEvent(self, QGraphicsSceneMouseEvent)
mouseReleaseEvent(self, QGraphicsSceneMouseEvent)
name(self) str
Return type

str

nameChanged

Emitted when the layout’s name is changed.

See also

setName() [signal]

Parameters

name (str) –

readLayoutXml(self, layoutElement: QDomElement, document: QDomDocument, context: QgsReadWriteContext) bool
Parameters
  • layoutElement (QDomElement) –

  • document (QDomDocument) –

  • context (QgsReadWriteContext) –

Return type

bool

readXml(self, layoutElement: QDomElement, document: QDomDocument, context: QgsReadWriteContext) bool
Parameters
  • layoutElement (QDomElement) –

  • document (QDomDocument) –

  • context (QgsReadWriteContext) –

Return type

bool

receivers(self, PYQT_SIGNAL) int
sender(self) QObject
senderSignalIndex(self) int
setName(self, name: str)
Parameters

name (str) –

timerEvent(self, QTimerEvent)
updateSettings(self)
wheelEvent(self, QGraphicsSceneWheelEvent)
writeLayoutXml(self, document: QDomDocument, context: QgsReadWriteContext) QDomElement
Parameters
Return type

QDomElement

writeXml(self, document: QDomDocument, context: QgsReadWriteContext) QDomElement
Parameters
Return type

QDomElement