53 QString
stringType()
const override {
return QStringLiteral(
"LayoutPageCollection" ); }
61 QList< QgsLayoutItemPage * > pages();
67 int pageCount()
const;
99 QList< QgsLayoutItemPage * > visiblePages(
const QRectF ®ion )
const;
106 QList< int > visiblePageNumbers(
const QRectF ®ion )
const;
113 bool pageIsEmpty(
int page )
const;
118 QList< QgsLayoutItem *> itemsOnPage(
int page )
const;
127 const QList<QGraphicsItem *> graphicsItemList = mLayout->items();
128 for ( QGraphicsItem *graphicsItem : graphicsItemList )
130 T *item =
dynamic_cast<T *
>( graphicsItem );
131 if ( item && item->page() == page )
133 itemList.push_back( item );
146 bool shouldExportPage(
int page )
const;
200 void deletePage(
int pageNumber );
245 void beginPageSizeChange();
253 void endPageSizeChange();
267 double maximumPageWidth() const;
275 QSizeF maximumPageSize() const;
283 bool hasUniformPageSizes() const;
299 int pageNumberForPoint( QPointF point ) const;
316 int predictPageNumberForPoint( QPointF point ) const;
334 QPointF pagePositionToLayoutPosition(
int page, const
QgsLayoutPoint &position ) const;
347 QPointF positionOnPage( QPointF point ) const;
352 double spaceBetweenPages() const;
357 double pageShadowWidth() const;
367 void resizeToContents( const
QgsMargins &margins,
Qgis::LayoutUnit marginUnits );
373 bool writeXml( QDomElement &parentElement, QDomDocument &document, const
QgsReadWriteContext &context ) const override;
379 bool readXml( const QDomElement &collectionElement, const QDomDocument &document, const
QgsReadWriteContext &context ) override;
396 void applyPropertiesToAllOtherPages(
int sourcePage );
418 void pageAboutToBeRemoved(
int pageNumber );
431 bool mBlockUndoCommands = false;
433 QMap< QString, QPair<
int,
QgsLayoutPoint > > mPreviousItemPositions;
435 void createDefaultPageStyleSymbol();
437 friend class QgsLayoutPageCollectionUndoCommand;
Item representing the paper in a layout.
A manager for a collection of pages in a layout.
void itemsOnPage(QList< T * > &itemList, int page) const
Returns layout items of a specific type on a specified page.
QString stringType() const override
Returns the object type as a string.
The class is used as a container of context for various read/write operations on other objects.