Manages storage of a set of layouts.
More...
#include <qgslayoutmanager.h>
Manages storage of a set of layouts.
QgsLayoutManager handles the storage, serializing and deserializing of print layouts and reports. Usually this class is not constructed directly, but rather accessed through a QgsProject via QgsProject::layoutManager().
QgsLayoutManager retains ownership of all the layouts contained in the manager.
- Since
- QGIS 3.0
Definition at line 44 of file qgslayoutmanager.h.
◆ QgsLayoutManager()
QgsLayoutManager::QgsLayoutManager |
( |
QgsProject * |
project = nullptr | ) |
|
|
explicit |
◆ ~QgsLayoutManager()
QgsLayoutManager::~QgsLayoutManager |
( |
| ) |
|
|
override |
◆ accept()
Accepts the specified style entity visitor, causing it to visit all style entities associated within the contained layouts.
Returns true
if the visitor should continue visiting other objects, or false
if visiting should be canceled.
- Since
- QGIS 3.10
Definition at line 310 of file qgslayoutmanager.cpp.
◆ addLayout()
Adds a layout to the manager.
Ownership of the layout is transferred to the manager. Returns true
if the addition was successful, or false
if the layout could not be added (eg as a result of a duplicate layout name).
- See also
- removeLayout()
-
layoutAdded()
Definition at line 41 of file qgslayoutmanager.cpp.
◆ clear()
void QgsLayoutManager::clear |
( |
| ) |
|
◆ duplicateLayout()
Duplicates an existing layout from the manager.
The new layout will automatically be stored in the manager. Returns the new layout if duplication was successful.
Definition at line 261 of file qgslayoutmanager.cpp.
◆ generateUniqueTitle()
Generates a unique title for a new layout of the specified type, which does not clash with any already contained by the manager.
Definition at line 284 of file qgslayoutmanager.cpp.
◆ layoutAboutToBeAdded
void QgsLayoutManager::layoutAboutToBeAdded |
( |
const QString & |
name | ) |
|
|
signal |
Emitted when a layout is about to be added to the manager.
◆ layoutAboutToBeRemoved
void QgsLayoutManager::layoutAboutToBeRemoved |
( |
const QString & |
name | ) |
|
|
signal |
Emitted when a layout is about to be removed from the manager.
◆ layoutAdded
void QgsLayoutManager::layoutAdded |
( |
const QString & |
name | ) |
|
|
signal |
Emitted when a layout has been added to the manager.
◆ layoutByName()
Returns the layout with a matching name, or nullptr
if no matching layouts were found.
Definition at line 124 of file qgslayoutmanager.cpp.
◆ layoutRemoved
void QgsLayoutManager::layoutRemoved |
( |
const QString & |
name | ) |
|
|
signal |
Emitted when a layout was removed from the manager.
◆ layoutRenamed
Emitted when a layout is renamed.
◆ layouts()
◆ printLayouts()
◆ readXml()
bool QgsLayoutManager::readXml |
( |
const QDomElement & |
element, |
|
|
const QDomDocument & |
doc |
|
) |
| |
Reads the manager's state from a DOM element, restoring all layouts present in the XML document.
- See also
- writeXml()
Definition at line 134 of file qgslayoutmanager.cpp.
◆ removeLayout()
◆ writeXml()
QDomElement QgsLayoutManager::writeXml |
( |
QDomDocument & |
doc | ) |
const |
The documentation for this class was generated from the following files: