QGIS API Documentation 3.36.0-Maidenhead (09951dc0acf)
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
QgsMasterLayoutInterface Class Referenceabstract

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

#include <qgsmasterlayoutinterface.h>

Inheritance diagram for QgsMasterLayoutInterface:
Inheritance graph
[legend]

Public Types

enum  Type { PrintLayout = 0 , Report = 1 }
 Master layout type. More...
 

Public Member Functions

virtual ~QgsMasterLayoutInterface ()=default
 
virtual QgsMasterLayoutInterfaceclone () const =0
 Creates a clone of the layout.
 
virtual QIcon icon () const =0
 Returns an icon for the layout.
 
virtual bool layoutAccept (QgsStyleEntityVisitorInterface *visitor) const
 Accepts the specified style entity visitor, causing it to visit all style entities associated with the layout.
 
virtual QgsProjectlayoutProject () const =0
 The project associated with the layout.
 
virtual QgsMasterLayoutInterface::Type layoutType () const =0
 Returns the master layout type.
 
virtual QString name () const =0
 Returns the layout's name.
 
virtual bool readLayoutXml (const QDomElement &layoutElement, const QDomDocument &document, const QgsReadWriteContext &context)=0
 Sets the layout's state from a DOM element.
 
virtual void setName (const QString &name)=0
 Sets the layout's name.
 
virtual void updateSettings ()=0
 Refreshes the layout when global layout related options change.
 
virtual QDomElement writeLayoutXml (QDomDocument &document, const QgsReadWriteContext &context) const =0
 Returns the layout's state encapsulated in a DOM element.
 

Detailed Description

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

Definition at line 41 of file qgsmasterlayoutinterface.h.

Member Enumeration Documentation

◆ Type

Master layout type.

Enumerator
PrintLayout 

Individual print layout (QgsPrintLayout)

Report 

Report (QgsReport)

Definition at line 65 of file qgsmasterlayoutinterface.h.

Constructor & Destructor Documentation

◆ ~QgsMasterLayoutInterface()

virtual QgsMasterLayoutInterface::~QgsMasterLayoutInterface ( )
virtualdefault

Member Function Documentation

◆ clone()

virtual QgsMasterLayoutInterface * QgsMasterLayoutInterface::clone ( ) const
pure virtual

Creates a clone of the layout.

Ownership of the returned layout is transferred to the caller.

Implemented in QgsPrintLayout.

◆ icon()

virtual QIcon QgsMasterLayoutInterface::icon ( ) const
pure virtual

Returns an icon for the layout.

Implemented in QgsPrintLayout.

◆ layoutAccept()

virtual bool QgsMasterLayoutInterface::layoutAccept ( QgsStyleEntityVisitorInterface visitor) const
inlinevirtual

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.

Since
QGIS 3.10

Reimplemented in QgsPrintLayout.

Definition at line 133 of file qgsmasterlayoutinterface.h.

◆ layoutProject()

virtual 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 nullptr.

Implemented in QgsPrintLayout.

◆ layoutType()

virtual QgsMasterLayoutInterface::Type QgsMasterLayoutInterface::layoutType ( ) const
pure virtual

Returns the master layout type.

Implemented in QgsPrintLayout.

◆ name()

virtual QString QgsMasterLayoutInterface::name ( ) const
pure virtual

Returns the layout's name.

See also
setName()

Implemented in QgsPrintLayout.

◆ readLayoutXml()

virtual 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.

See also
writeLayoutXml()

Implemented in QgsPrintLayout.

◆ setName()

virtual void QgsMasterLayoutInterface::setName ( const QString &  name)
pure virtual

Sets the layout's name.

See also
name()

Implemented in QgsPrintLayout.

◆ updateSettings()

virtual void QgsMasterLayoutInterface::updateSettings ( )
pure virtual

Refreshes the layout when global layout related options change.

Implemented in QgsPrintLayout.

◆ writeLayoutXml()

virtual QDomElement QgsMasterLayoutInterface::writeLayoutXml ( QDomDocument &  document,
const QgsReadWriteContext context 
) const
pure virtual

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

See also
readLayoutXml()

Implemented in QgsPrintLayout.


The documentation for this class was generated from the following file: