QGIS API Documentation  3.2.0-Bonn (bc43194)
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. More...
 
virtual QIcon icon () const =0
 Returns an icon for the layout. More...
 
virtual QgsProjectlayoutProject () const =0
 The project associated with the layout. More...
 
virtual QgsMasterLayoutInterface::Type layoutType () const =0
 Returns the master layout type. More...
 
virtual QString name () const =0
 Returns the layout's name. More...
 
virtual bool readLayoutXml (const QDomElement &layoutElement, const QDomDocument &document, const QgsReadWriteContext &context)=0
 Sets the layout's state from a DOM element. More...
 
virtual void setName (const QString &name)=0
 Sets the layout's name. More...
 
virtual void updateSettings ()=0
 Refreshes the layout when global layout related options change. More...
 
virtual QDomElement writeLayoutXml (QDomDocument &document, const QgsReadWriteContext &context) const =0
 Returns the layout's state encapsulated in a DOM element. More...
 

Detailed Description

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

Since
QGIS 3.0

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.

◆ 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 null.

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: