Class: QgsPrintLayout

class qgis.core.QgsPrintLayout

Bases: QgsLayout, QgsMasterLayoutInterface

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

QgsPrintLayout(project: Optional[QgsProject]) Constructor for QgsPrintLayout.

Methods

atlas

Returns the print layout's atlas.

childEvent

clone

rtype:

Optional[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:

Optional[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:

atlas(self) QgsLayoutAtlas | None

Returns the print layout’s atlas.

Return type:

Optional[QgsLayoutAtlas]

childEvent(self, a0: QChildEvent | None)
clone(self) QgsPrintLayout | None
Return type:

Optional[QgsPrintLayout]

connectNotify(self, signal: QMetaMethod)
contextMenuEvent(self, event: QGraphicsSceneContextMenuEvent | None)
createExpressionContext(self) QgsExpressionContext
Return type:

QgsExpressionContext

customEvent(self, a0: QEvent | None)
disconnectNotify(self, signal: QMetaMethod)
dragEnterEvent(self, event: QGraphicsSceneDragDropEvent | None)
dragLeaveEvent(self, event: QGraphicsSceneDragDropEvent | None)
dragMoveEvent(self, event: QGraphicsSceneDragDropEvent | None)
drawBackground(self, painter: QPainter | None, rect: QRectF)
drawForeground(self, painter: QPainter | None, rect: QRectF)
dropEvent(self, event: QGraphicsSceneDragDropEvent | None)
event(self, event: QEvent | None) bool
eventFilter(self, watched: QObject | None, event: QEvent | None) bool
focusInEvent(self, event: QFocusEvent | None)
focusNextPrevChild(self, next: bool) bool
focusOutEvent(self, event: QFocusEvent | None)
helpEvent(self, event: QGraphicsSceneHelpEvent | None)
icon(self) QIcon
Return type:

QIcon

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

visitor (Optional[QgsStyleEntityVisitorInterface])

Return type:

bool

layoutProject(self) QgsProject | None
Return type:

Optional[QgsProject]

layoutType(self) QgsMasterLayoutInterface.Type
Return type:

QgsMasterLayoutInterface.Type

mouseDoubleClickEvent(self, event: QGraphicsSceneMouseEvent | None)
mouseMoveEvent(self, event: QGraphicsSceneMouseEvent | None)
mousePressEvent(self, event: QGraphicsSceneMouseEvent | None)
mouseReleaseEvent(self, event: QGraphicsSceneMouseEvent | None)
name(self) str
Return type:

str

nameChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...)

  • revision (int = ...)

  • arguments (Sequence = ...)

Return type:

PYQT_SIGNAL

readLayoutXml(self, layoutElement: QDomElement, document: QDomDocument, context: QgsReadWriteContext) bool
Parameters:
Return type:

bool

readXml(self, layoutElement: QDomElement, document: QDomDocument, context: QgsReadWriteContext) bool
Parameters:
Return type:

bool

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

name (Optional[str])

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

QDomElement

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

QDomElement