QgsMasterLayoutInterface class
Interface for master layout type objects, such as print layouts and reports.
Contents
- Reference
Derived classes
- class QgsPrintLayout
- Print layout, a QgsLayout subclass for static or atlas-based layouts.
Public types
- enum Type { PrintLayout = 0, Report = 1 }
- Master layout type.
Public functions
- auto clone() const -> QgsMasterLayoutInterface* pure virtual
- Creates a clone of the layout.
- auto icon() const -> QIcon pure virtual
- Returns an icon for the layout.
- auto layoutProject() const -> QgsProject* pure virtual
- The project associated with the layout.
-
auto layoutType() const -> QgsMasterLayoutInterface::
Type pure virtual - Returns the master layout type.
- auto name() const -> QString pure virtual
- Returns the layout's name.
- auto readLayoutXml(const QDomElement& layoutElement, const QDomDocument& document, const QgsReadWriteContext& context) -> bool pure virtual
- Sets the layout's state from a DOM element.
- void setName(const QString& name) pure virtual
- Sets the layout's name.
- void updateSettings() pure virtual
- Refreshes the layout when global layout related options change.
- auto writeLayoutXml(QDomDocument& document, const QgsReadWriteContext& context) const -> QDomElement pure virtual
- Returns the layout's state encapsulated in a DOM element.
Enum documentation
enum QgsMasterLayoutInterface:: Type
Master layout type.
| Enumerators | |
|---|---|
| PrintLayout |
Individual print layout (QgsPrintLayout) |
| Report |
Report (QgsReport) |
Function documentation
QgsMasterLayoutInterface* QgsMasterLayoutInterface:: clone() const pure virtual
Creates a clone of the layout.
Ownership of the returned layout is transferred to the caller.
QgsProject* QgsMasterLayoutInterface:: layoutProject() const pure virtual
The project associated with the layout.
Used to get access to layers, map themes, relations and various other bits. It is never null.
QString QgsMasterLayoutInterface:: name() const pure virtual
Returns the layout's name.
bool QgsMasterLayoutInterface:: readLayoutXml(const QDomElement& layoutElement,
const QDomDocument& document,
const QgsReadWriteContext& context) pure virtual
Sets the layout's state from a DOM element.
layoutElement is the DOM node corresponding to the layout.
void QgsMasterLayoutInterface:: setName(const QString& name) pure virtual
Sets the layout's name.
QDomElement QgsMasterLayoutInterface:: writeLayoutXml(QDomDocument& document,
const QgsReadWriteContext& context) const pure virtual
Returns the layout's state encapsulated in a DOM element.