Class: QgsMasterLayoutInterface

class qgis.core.QgsMasterLayoutInterface

Bases: sip.wrapper

Interface for master layout type objects, such as print layouts and reports.

New in version 3.0: Enums

Methods

clone

Creates a clone of the layout.

icon

Returns an icon for the layout.

layoutAccept

Accepts the specified style entity visitor, causing it to visit all style entities associated with the layout.

layoutProject

The project associated with the layout.

layoutType

Returns the master layout type.

name

Returns the layout’s name.

readLayoutXml

Sets the layout’s state from a DOM element.

setName

Sets the layout’s name.

updateSettings

Refreshes the layout when global layout related options change.

writeLayoutXml

Returns the layout’s state encapsulated in a DOM element.

Signals

Attributes

PrintLayout

Report

PrintLayout = 0
Report = 1
class Type

Bases: int

clone(self) → QgsMasterLayoutInterface

Creates a clone of the layout. Ownership of the returned layout is transferred to the caller.

icon(self) → QIcon

Returns an icon for the layout.

layoutAccept(self, visitor: QgsStyleEntityVisitorInterface) → bool

Accepts the specified style entity visitor, causing it to visit all style entities associated with the layout.

Returns True if the visitor should continue visiting other objects, or False if visiting should be canceled.

New in version 3.10.

layoutProject(self) → QgsProject

The project associated with the layout. Used to get access to layers, map themes, relations and various other bits. It is never None.

layoutType(self) → QgsMasterLayoutInterface.Type

Returns the master layout type.

name(self) → str

Returns the layout’s name.

See also

setName()

readLayoutXml(self, layoutElement: QDomElement, document: QDomDocument, context: QgsReadWriteContext) → bool

Sets the layout’s state from a DOM element. layoutElement is the DOM node corresponding to the layout.

See also

writeLayoutXml()

setName(self, name: str)

Sets the layout’s name.

See also

name()

updateSettings(self)

Refreshes the layout when global layout related options change.

writeLayoutXml(self, document: QDomDocument, context: QgsReadWriteContext) → QDomElement

Returns the layout’s state encapsulated in a DOM element.

See also

readLayoutXml()