Class: QgsMasterLayoutInterface¶
Interface for master layout type objects, such as print layouts and reports.
Class Hierarchy¶
Subclasses¶
Print layout, a   | 
|
Represents a report for use with the   | 
Methods
Creates a clone of the layout.  | 
|
Returns an icon for the layout.  | 
|
Accepts the specified style entity visitor, causing it to visit all style entities associated with the layout.  | 
|
The project associated with the layout.  | 
|
Returns the master layout type.  | 
|
Returns the layout's name.  | 
|
Sets the layout's state from a DOM element.  | 
|
Sets the layout's name.  | 
|
Refreshes the layout when global layout related options change.  | 
|
Returns the layout's state encapsulated in a DOM element.  | 
Attributes
- class qgis.core.QgsMasterLayoutInterface[source]¶
 Bases:
object- PrintLayout = 0¶
 
- Report = 1¶
 
- class Type¶
 Bases:
int
- clone(self) QgsMasterLayoutInterface | None[source]¶
 Creates a clone of the layout. Ownership of the returned layout is transferred to the caller.
- Return type:
 Optional[QgsMasterLayoutInterface]
- layoutAccept(self, visitor: QgsStyleEntityVisitorInterface | None) bool[source]¶
 Accepts the specified style entity
visitor, causing it to visit all style entities associated with the layout.Returns
Trueif the visitor should continue visiting other objects, orFalseif visiting should be canceled.Added in version 3.10.
- Parameters:
 visitor (Optional[QgsStyleEntityVisitorInterface])
- Return type:
 bool
- layoutProject(self) QgsProject | None[source]¶
 The project associated with the layout. Used to get access to layers, map themes, relations and various other bits. It is never
None.- Return type:
 Optional[QgsProject]
- layoutType(self) QgsMasterLayoutInterface.Type[source]¶
 Returns the master layout type.
- Return type:
 
- readLayoutXml(self, layoutElement: QDomElement, document: QDomDocument, context: QgsReadWriteContext) bool[source]¶
 Sets the layout’s state from a DOM element.
layoutElementis the DOM node corresponding to the layout.See also
- Parameters:
 layoutElement (QDomElement)
document (QDomDocument)
context (QgsReadWriteContext)
- Return type:
 bool
- setName(self, name: str | None)[source]¶
 Sets the layout’s name.
See also
- Parameters:
 name (Optional[str])
- writeLayoutXml(self, document: QDomDocument, context: QgsReadWriteContext) QDomElement[source]¶
 Returns the layout’s state encapsulated in a DOM element.
See also
- Parameters:
 document (QDomDocument)
context (QgsReadWriteContext)
- Return type:
 QDomElement