39 , mGridSettings( this )
44 setBackgroundBrush( Qt::NoBrush );
51 mUndoStack->blockCommands(
true );
53 deleteAndRemoveMultiFrames();
61 QList<QGraphicsItem *> itemList = items();
66 for ( QGraphicsItem *item : qgis::as_const( itemList ) )
68 if ( dynamic_cast< QgsLayoutItem * >( item ) && !dynamic_cast< QgsLayoutItemPage *>( item ) )
83 QDomDocument currentDoc;
86 QDomElement elem =
writeXml( currentDoc, context );
87 currentDoc.appendChild( elem );
89 std::unique_ptr< QgsLayout > newLayout = qgis::make_unique< QgsLayout >( mProject );
91 newLayout->loadFromTemplate( currentDoc, context,
true, &ok );
97 return newLayout.release();
105 mPageCollection->addPage( page );
106 mUndoStack->stack()->clear();
111 deleteAndRemoveMultiFrames();
114 const QList<QGraphicsItem *> itemList = items();
115 for ( QGraphicsItem *item : itemList )
119 if ( cItem && !pItem )
121 removeLayoutItemPrivate( cItem );
124 mItemsModel->clear();
126 mPageCollection->clear();
127 mUndoStack->stack()->clear();
137 return mItemsModel.get();
142 QList<QgsLayoutItem *> layoutItemList;
144 const QList<QGraphicsItem *> graphicsItemList = selectedItems();
145 for ( QGraphicsItem *item : graphicsItemList )
148 if ( layoutItem && ( includeLockedItems || !layoutItem->
isLocked() ) )
150 layoutItemList.push_back( layoutItem );
154 return layoutItemList;
173 const QList<QGraphicsItem *> selectedItemList = selectedItems();
174 for ( QGraphicsItem *item : selectedItemList )
176 if (
QgsLayoutItem *layoutItem = dynamic_cast<QgsLayoutItem *>( item ) )
178 layoutItem->setSelected(
false );
187 bool result = mItemsModel->reorderItemUp( item );
188 if ( result && !deferUpdate )
200 bool result = mItemsModel->reorderItemDown( item );
201 if ( result && !deferUpdate )
213 bool result = mItemsModel->reorderItemToTop( item );
214 if ( result && !deferUpdate )
226 bool result = mItemsModel->reorderItemToBottom( item );
227 if ( result && !deferUpdate )
238 QList<QgsLayoutItem *> itemList;
242 if ( item->uuid() == uuid )
244 else if ( includeTemplateUuids && item->mTemplateUuid == uuid )
253 QList<QgsLayoutItem *> itemList;
257 if ( item->mTemplateUuid == uuid )
266 const QList<QGraphicsItem *> itemList = items();
267 for ( QGraphicsItem *item : itemList )
270 if ( layoutItem && layoutItem->
id() == id )
282 if ( mf->uuid() == uuid )
284 else if ( includeTemplateUuids && mf->mTemplateUuid == uuid )
299 const QList<QGraphicsItem *> itemList = items( position, Qt::IntersectsItemShape, Qt::DescendingOrder );
301 bool foundBelowItem =
false;
302 for ( QGraphicsItem *graphicsItem : itemList )
306 if ( layoutItem && !paperItem )
310 if ( ( ! belowItem || foundBelowItem ) && ( !ignoreLocked || !layoutItem->
isLocked() ) )
316 if ( layoutItem == belowItem )
319 foundBelowItem =
true;
359 return *mRenderContext;
364 return *mRenderContext;
369 return *mReportContext;
374 return *mReportContext;
380 mPageCollection->redraw();
385 return mPageCollection->guides();
390 return mPageCollection->guides();
398 if ( mReportContext->
layer() )
407 mCustomProperties.
setValue( key, value );
409 if ( key.startsWith( QLatin1String(
"variable" ) ) )
415 return mCustomProperties.
value( key, defaultValue );
420 mCustomProperties.
remove( key );
425 return mCustomProperties.
keys();
435 QList< QgsLayoutItemMap * > maps;
438 double largestMapArea = 0;
441 double area = map->rect().width() * map->rect().height();
442 if ( area > largestMapArea )
444 largestMapArea = area;
453 mWorldFileMapId = map ? map->
uuid() : QString();
459 return mPageCollection.get();
464 return mPageCollection.get();
473 const auto constItems = items();
474 for (
const QGraphicsItem *item : constItems )
481 if ( !isPage || !ignorePages )
489 itemBounds = layoutItem->mapToScene( layoutItem->rect() ).boundingRect();
492 itemBounds = item->sceneBoundingRect();
494 if ( bounds.isValid() )
495 bounds = bounds.united( itemBounds );
501 if ( bounds.isValid() && margin > 0.0 )
504 double maxWidth = mPageCollection->maximumPageWidth();
505 bounds.adjust( -maxWidth * margin, -maxWidth * margin, maxWidth * margin, maxWidth * margin );
518 const QList<QGraphicsItem *> itemList = items();
519 for ( QGraphicsItem *item : itemList )
524 if ( visibleOnly && !layoutItem->isVisible() )
528 if ( bounds.isValid() )
529 bounds = bounds.united( item->sceneBoundingRect() );
531 bounds = item->sceneBoundingRect();
540 addLayoutItemPrivate( item );
544 undoText = tr(
"Create %1" ).arg( metadata->visibleName() );
548 undoText = tr(
"Create Item" );
550 if ( !mUndoStack->isBlocked() )
556 std::unique_ptr< QgsLayoutItemDeleteUndoCommand > deleteCommand;
557 if ( !mUndoStack->isBlocked() )
559 mUndoStack->beginMacro( tr(
"Delete Items" ) );
562 removeLayoutItemPrivate( item );
565 mUndoStack->push( deleteCommand.release() );
566 mUndoStack->endMacro();
575 if ( !mMultiFrames.contains( multiFrame ) )
576 mMultiFrames << multiFrame;
581 mMultiFrames.removeAll( multiFrame );
591 QFile templateFile( path );
592 if ( !templateFile.open( QIODevice::WriteOnly | QIODevice::Truncate ) )
597 QDomDocument saveDocument;
598 QDomElement elem =
writeXml( saveDocument, context );
599 saveDocument.appendChild( elem );
601 if ( templateFile.write( saveDocument.toByteArray() ) == -1 )
612 QList< QgsLayoutItem * > result;
632 QDomNodeList itemsNodes = doc.elementsByTagName( QStringLiteral(
"LayoutItem" ) );
633 for (
int i = 0; i < itemsNodes.count(); ++i )
635 QDomNode itemNode = itemsNodes.at( i );
636 if ( itemNode.isElement() )
638 itemNode.toElement().removeAttribute( QStringLiteral(
"uuid" ) );
641 QDomNodeList multiFrameNodes = doc.elementsByTagName( QStringLiteral(
"LayoutMultiFrame" ) );
642 for (
int i = 0; i < multiFrameNodes.count(); ++i )
644 QDomNode multiFrameNode = multiFrameNodes.at( i );
645 if ( multiFrameNode.isElement() )
647 multiFrameNode.toElement().removeAttribute( QStringLiteral(
"uuid" ) );
648 QDomNodeList frameNodes = multiFrameNode.toElement().elementsByTagName( QStringLiteral(
"childFrame" ) );
649 QDomNode itemNode = frameNodes.at( i );
650 if ( itemNode.isElement() )
652 itemNode.toElement().removeAttribute( QStringLiteral(
"uuid" ) );
660 QDomElement layoutElem = doc.documentElement();
661 if ( layoutElem.isNull() )
666 bool loadOk =
readXml( layoutElem, doc, context );
686 return mUndoStack.get();
691 return mUndoStack.get();
706 void saveState( QDomDocument &stateDoc )
const override 709 QDomElement documentElement = stateDoc.createElement( QStringLiteral(
"UndoState" ) );
711 stateDoc.appendChild( documentElement );
714 void restoreState( QDomDocument &stateDoc )
override 721 mLayout->readXmlLayoutSettings( stateDoc.documentElement(), stateDoc,
QgsReadWriteContext() );
722 mLayout->project()->setDirty(
true );
738 if ( items.size() < 2 )
744 mUndoStack->beginMacro( tr(
"Group Items" ) );
748 itemGroup->addItem( item );
753 std::unique_ptr< QgsLayoutItemGroupUndoCommand >
c(
new QgsLayoutItemGroupUndoCommand( QgsLayoutItemGroupUndoCommand::Grouped, returnGroup,
this, tr(
"Group Items" ) ) );
754 mUndoStack->push( c.release() );
755 mProject->setDirty(
true );
757 mUndoStack->endMacro();
764 QList<QgsLayoutItem *> ungroupedItems;
767 return ungroupedItems;
770 mUndoStack->beginMacro( tr(
"Ungroup Items" ) );
773 std::unique_ptr< QgsLayoutItemGroupUndoCommand >
c(
new QgsLayoutItemGroupUndoCommand( QgsLayoutItemGroupUndoCommand::Ungrouped, group,
this, tr(
"Ungroup Items" ) ) );
774 mUndoStack->push( c.release() );
776 mProject->setDirty(
true );
778 ungroupedItems = group->
items();
782 mUndoStack->endMacro();
784 return ungroupedItems;
789 mUndoStack->blockCommands(
true );
790 mPageCollection->beginPageSizeChange();
792 mPageCollection->reflow();
793 mPageCollection->endPageSizeChange();
794 mUndoStack->blockCommands(
false );
798 void QgsLayout::writeXmlLayoutSettings( QDomElement &element, QDomDocument &document,
const QgsReadWriteContext & )
const 800 mCustomProperties.writeXml( element, document );
802 element.setAttribute( QStringLiteral(
"worldFileMap" ), mWorldFileMapId );
803 element.setAttribute( QStringLiteral(
"printResolution" ), mRenderContext->dpi() );
808 QDomElement element = document.createElement( QStringLiteral(
"Layout" ) );
811 return object->writeXml( element, document, context );
814 save( &mGridSettings );
815 save( mPageCollection.get() );
818 const QList<QGraphicsItem *> itemList = items();
819 for (
const QGraphicsItem *graphicsItem : itemList )
821 if (
const QgsLayoutItem *item = dynamic_cast< const QgsLayoutItem *>( graphicsItem ) )
826 item->writeXml( element, document, context );
833 mf->writeXml( element, document, context );
836 writeXmlLayoutSettings( element, document, context );
840 bool QgsLayout::readXmlLayoutSettings(
const QDomElement &layoutElement,
const QDomDocument &,
const QgsReadWriteContext & )
842 mCustomProperties.readXml( layoutElement );
844 mWorldFileMapId = layoutElement.attribute( QStringLiteral(
"worldFileMap" ) );
845 mRenderContext->setDpi( layoutElement.attribute( QStringLiteral(
"printResolution" ), QStringLiteral(
"300" ) ).toDouble() );
855 mItemsModel->rebuildZList();
858 void QgsLayout::removeLayoutItemPrivate(
QgsLayoutItem *item )
860 mItemsModel->setItemRemoved( item );
867 emit itemRemoved( item );
873 void QgsLayout::deleteAndRemoveMultiFrames()
875 qDeleteAll( mMultiFrames );
876 mMultiFrames.clear();
879 QPointF QgsLayout::minPointFromXml(
const QDomElement &elem )
const 881 double minX = std::numeric_limits<double>::max();
882 double minY = std::numeric_limits<double>::max();
883 const QDomNodeList itemList = elem.elementsByTagName( QStringLiteral(
"LayoutItem" ) );
885 for (
int i = 0; i < itemList.size(); ++i )
887 const QDomElement currentItemElem = itemList.at( i ).toElement();
892 minX = std::min( minX, layoutPoint.x() );
893 minY = std::min( minY, layoutPoint.y() );
896 return found ? QPointF( minX, minY ) : QPointF( 0, 0 );
901 int counter = mItemsModel->zOrderListSize();
902 const QList<QgsLayoutItem *> zOrderList = mItemsModel->zOrderList();
904 if ( addUndoCommands )
906 mUndoStack->beginMacro( tr(
"Change Item Stacking" ) );
912 if ( addUndoCommands )
914 mUndoStack->beginCommand( currentItem, QString() );
916 currentItem->setZValue( counter );
917 if ( addUndoCommands )
919 mUndoStack->endCommand();
924 if ( addUndoCommands )
926 mUndoStack->endMacro();
932 if ( layoutElement.nodeName() != QStringLiteral(
"Layout" ) )
939 return object->readXml( layoutElement, document, context );
942 blockSignals(
true );
943 readXmlLayoutSettings( layoutElement, document, context );
944 blockSignals(
false );
946 restore( mPageCollection.get() );
947 restore( &mSnapper );
948 restore( &mGridSettings );
958 QList< QgsLayoutItem * > newItems;
959 QList< QgsLayoutMultiFrame * > newMultiFrames;
964 int zOrderOffset = mItemsModel->zOrderListSize();
966 QPointF pasteShiftPos;
973 QPointF minItemPos = minPointFromXml( parentElement );
976 pasteShiftPos = *position - minItemPos;
979 pageNumber = mPageCollection->pageNumberForPoint( *position );
985 const QDomNodeList multiFrameList = parentElement.elementsByTagName( QStringLiteral(
"LayoutMultiFrame" ) );
986 for (
int i = 0; i < multiFrameList.size(); ++i )
988 const QDomElement multiFrameElem = multiFrameList.at( i ).toElement();
989 const int itemType = multiFrameElem.attribute( QStringLiteral(
"type" ) ).toInt();
996 mf->readXml( multiFrameElem, document, context );
999 mf->setCreateUndoCommands(
true );
1014 newMultiFrames << m;
1017 const QDomNodeList layoutItemList = parentElement.childNodes();
1018 for (
int i = 0; i < layoutItemList.size(); ++i )
1020 const QDomElement currentItemElem = layoutItemList.at( i ).toElement();
1021 if ( currentItemElem.nodeName() != QStringLiteral(
"LayoutItem" ) )
1024 const int itemType = currentItemElem.attribute( QStringLiteral(
"type" ) ).toInt();
1032 item->readXml( currentItemElem, document, context );
1038 item->attemptMove( posOnPage,
true,
false, pageNumber );
1042 item->attemptMoveBy( pasteShiftPos.x(), pasteShiftPos.y() );
1048 layoutItem->setZValue( layoutItem->zValue() + zOrderOffset );
1049 newItems << layoutItem;
1062 mf->finalizeRestoreFromXml();
1067 item->mTemplateUuid.clear();
1071 mf->mTemplateUuid.clear();
1077 mItemsModel->rebuildZList();
void setDirty(bool b=true)
Flag the project as dirty (modified).
The class is used as a container of context for various read/write operations on other objects...
void removeItems()
Removes all items from the group (but does not delete them).
void setSelectedItem(QgsLayoutItem *item)
Clears any selected items and sets item as the current selection.
bool raiseItem(QgsLayoutItem *item, bool deferUpdate=false)
Raises an item up the z-order.
QgsLayoutGuideCollection & guides()
Returns a reference to the layout's guide collection, which manages page snap guides.
QgsLayoutItem * itemById(const QString &id) const
Returns a layout item given its id.
QRectF layoutBounds(bool ignorePages=false, double margin=0.0) const
Calculates the bounds of all non-gui items in the layout.
QgsLayout * clone() const
Creates a clone of the layout.
Base class for graphical items within a QgsLayout.
int type() const override
Returns a unique graphics item type identifier.
QgsLayoutMultiFrame * multiFrameByUuid(const QString &uuid, bool includeTemplateUuids=false) const
Returns the layout multiframe with matching uuid unique identifier, or nullptr if a matching multifra...
Base class for commands to undo/redo layout and layout object changes.
QgsLayoutUndoStack * undoStack()
Returns a pointer to the layout's undo stack, which manages undo/redo states for the layout and it's ...
friend class QgsLayoutModel
QVariant customProperty(const QString &key, const QVariant &defaultValue=QVariant()) const
Read a custom property from the layout.
QgsLayoutMeasurement convert(QgsLayoutMeasurement measurement, QgsUnitTypes::LayoutUnit targetUnits) const
Converts a measurement from one unit to another.
Stores information relating to the current reporting context for a layout.
QgsLayoutItemGroup * groupItems(const QList< QgsLayoutItem *> &items)
Creates a new group from a list of layout items and adds the group to the layout. ...
virtual bool readXml(const QDomElement &layoutElement, const QDomDocument &document, const QgsReadWriteContext &context)
Sets the collection's state from a DOM element.
An undo stack for QgsLayouts.
QgsLayoutItem * itemByUuid(const QString &uuid, bool includeTemplateUuids=false) const
Returns the layout item with matching uuid unique identifier, or nullptr if a matching item could not...
void loadFromSettings()
Loads grid settings from the application layout settings.
A container for grouping several QgsLayoutItems.
static QDomDocument convertCompositionTemplate(const QDomDocument &document, QgsProject *project)
Convert a composition template document to a layout template.
virtual void setSelected(bool selected)
Sets whether the item should be selected.
QVariant value(const QString &key, const QVariant &defaultValue=QVariant()) const
Returns value for the given key. If the key is not stored, default value will be used.
QList< QgsLayoutItem *> addItemsFromXml(const QDomElement &parentElement, const QDomDocument &document, const QgsReadWriteContext &context, QPointF *position=nullptr, bool pasteInPlace=false)
Add items from an XML representation to the layout.
static QgsExpressionContextScope * projectScope(const QgsProject *project)
Creates a new scope which contains variables and functions relating to a QGIS project.
void setUnits(QgsUnitTypes::LayoutUnit units)
Sets the native measurement units for the layout.
QList< QgsLayoutItem * > ungroupItems(QgsLayoutItemGroup *group)
Ungroups items by removing them from an item group and removing the group from the layout...
void updateBounds()
Updates the scene bounds of the layout.
QgsLayoutRenderContext & renderContext()
Returns a reference to the layout's render context, which stores information relating to the current ...
void remove(const QString &key)
Remove a key (entry) from the store.
QList< QgsLayoutMultiFrame *> multiFrames() const
Returns a list of multi frames contained in the layout.
Abstract base class for layout items with the ability to distribute the content to several frames (Qg...
This class provides a method of storing points, consisting of an x and y coordinate, for use in QGIS layouts.
void layoutItems(QList< T *> &itemList) const
Returns a list of layout items of a specific type.
void removeCustomProperty(const QString &key)
Remove a custom property from the layout.
As part of the API refactoring and improvements which landed in the Processing API was substantially reworked from the x version This was done in order to allow much of the underlying Processing framework to be ported into c
void deselectAll()
Clears any selected items in the layout.
void updateZValues(bool addUndoCommands=true)
Resets the z-values of items based on their position in the internal z order list.
QgsVectorLayer * layer() const
Returns the vector layer associated with the layout's context.
static QgsLayoutItemRegistry * layoutItemRegistry()
Returns the application's layout item registry, used for layout item types.
Layout graphical items for displaying a map.
void setValue(const QString &key, const QVariant &value)
Add an entry to the store. If the entry with the keys exists already, it will be overwritten.
static QgsExpressionContextScope * globalScope()
Creates a new scope which contains variables and functions relating to the global QGIS context...
void variablesChanged()
Emitted whenever the expression variables stored in the layout have been changed. ...
This class provides a method of storing measurements for use in QGIS layouts using a variety of diffe...
static bool isCompositionTemplate(const QDomDocument &document)
Check if the given document is a composition template.
static Q_INVOKABLE QgsUnitTypes::LayoutUnit decodeLayoutUnit(const QString &string, bool *ok=nullptr)
Decodes a layout unit from a string.
void refresh()
Forces the layout, and all items contained within it, to refresh.
QStringList customProperties() const
Returns list of keys stored in custom properties for the layout.
QList< QgsLayoutItem * > items() const
Returns a list of items contained by the group.
QgsLayoutPageCollection * pageCollection()
Returns a pointer to the layout's page collection, which stores and manages page items in the layout...
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
QList< QgsLayoutItem * > selectedLayoutItems(bool includeLockedItems=true)
Returns list of selected layout items.
QList< QgsLayoutItem *> loadFromTemplate(const QDomDocument &document, const QgsReadWriteContext &context, bool clearExisting=true, bool *ok=nullptr)
Load a layout template document.
void selectedItemChanged(QgsLayoutItem *selected)
Emitted whenever the selected item changes.
virtual void cleanup()
Called just before a batch of items are deleted, allowing them to run cleanup tasks.
void removeMultiFrame(QgsLayoutMultiFrame *multiFrame)
Removes a multiFrame from the layout (but does not delete it).
Stores and manages the snap guides used by a layout.
Reads and writes project states.
int page() const
Returns the page the item is currently on, with the first page returning 0.
QString id() const
Returns the item's ID name.
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
QStringList keys() const
Returns list of stored keys.
A manager for a collection of pages in a layout.
QRectF pageItemBounds(int page, bool visibleOnly=false) const
Returns the bounding box of the items contained on a specified page.
bool lowerItem(QgsLayoutItem *item, bool deferUpdate=false)
Lowers an item down the z-order.
static Q_INVOKABLE QString encodeUnit(QgsUnitTypes::DistanceUnit unit)
Encodes a distance unit to a string.
QgsLayoutModel * itemsModel()
Returns the items model attached to the layout.
friend class QgsLayoutItemAddItemCommand
virtual void finalizeRestoreFromXml()
Called after all pending items have been restored from XML.
QgsLayoutReportContext & reportContext()
Returns a reference to the layout's report context, which stores information relating to the current ...
friend class QgsLayoutUndoCommand
QgsExpressionContext createExpressionContext() const override
Creates an expression context relating to the layout's current state.
bool moveItemToBottom(QgsLayoutItem *item, bool deferUpdate=false)
Lowers an item down to the bottom of the z-order.
void clear()
Clears the layout.
QgsLayoutItemMap * referenceMap() const
Returns the map item which will be used to generate corresponding world files when the layout is expo...
QgsSignalBlocker< Object > whileBlocking(Object *object)
Temporarily blocks signals from a QObject while calling a single method from the object.
double length() const
Returns the length of the measurement.
bool saveAsTemplate(const QString &path, const QgsReadWriteContext &context) const
Saves the layout as a template at the given file path.
const QgsLayoutMeasurementConverter & measurementConverter() const
Returns the layout measurement converter to be used in the layout.
void removeLayoutItem(QgsLayoutItem *item)
Removes an item from the layout.
static QgsExpressionContextScope * layoutScope(const QgsLayout *layout)
Creates a new scope which contains variables and functions relating to a QgsLayout layout...
void refreshed()
Emitted when the layout has been refreshed and items should also be refreshed and updated...
friend class QgsLayoutItemGroupUndoCommand
void appendScope(QgsExpressionContextScope *scope)
Appends a scope to the end of the context.
virtual QString uuid() const
Returns the item identification string.
void addLayoutItem(QgsLayoutItem *item)
Adds an item to the layout.
QgsLayoutMeasurement convertFromLayoutUnits(double length, QgsUnitTypes::LayoutUnit unit) const
Converts a length measurement from the layout's native units to a specified target unit...
Stores information relating to the current rendering settings for a layout.
void setReferenceMap(QgsLayoutItemMap *map)
Sets the map item which will be used to generate corresponding world files when the layout is exporte...
An interface for layout objects which can be stored and read from DOM elements.
void initializeDefaults()
Initializes an empty layout, e.g.
QgsProject * project() const
The project associated with the layout.
void setCustomProperty(const QString &key, const QVariant &value)
Set a custom property for the layout.
LayoutUnit
Layout measurement units.
virtual QDomElement writeXml(QDomDocument &document, const QgsReadWriteContext &context) const
Returns the layout's state encapsulated in a DOM element.
bool isLocked() const
Returns true if the item is locked, and cannot be interacted with using the mouse.
QgsAbstractLayoutUndoCommand * createCommand(const QString &text, int id=0, QUndoCommand *parent=nullptr) override
Creates a new layout undo command with the specified text and parent.
void setPageSize(const QgsLayoutSize &size)
Sets the size of the page.
double convertToLayoutUnits(QgsLayoutMeasurement measurement) const
Converts a measurement into the layout's native units.
A model for items attached to a layout.
Manages snapping grids and preset snap lines in a layout, and handles snapping points to the nearest ...
static QgsExpressionContextScope * layerScope(const QgsMapLayer *layer)
Creates a new scope which contains variables and functions relating to a QgsMapLayer.
This class provides a method of storing sizes, consisting of a width and height, for use in QGIS layo...
void changed()
Emitted when properties of the layout change.
QgsLayoutItem * layoutItemAt(QPointF position, bool ignoreLocked=false) const
Returns the topmost layout item at a specified position.
bool moveItemToTop(QgsLayoutItem *item, bool deferUpdate=false)
Raises an item up to the top of the z-order.
QgsLayoutItem * itemByTemplateUuid(const QString &uuid) const
Returns the layout item with matching template uuid unique identifier, or nullptr if a matching item ...
void reloadSettings()
Refreshes the layout when global layout related options change.
void addMultiFrame(QgsLayoutMultiFrame *multiFrame)
Adds a multiFrame to the layout.
QgsLayout(QgsProject *project)
Construct a new layout linked to the specified project.
static QgsLayoutPoint decodePoint(const QString &string)
Decodes a point from a string.
Item representing the paper in a layout.
friend class QgsLayoutItemDeleteUndoCommand