54 QString
stringType()
const override {
return QStringLiteral(
"LayoutPageCollection" ); }
62 QList< QgsLayoutItemPage * > pages();
68 int pageCount()
const;
100 QList< QgsLayoutItemPage * > visiblePages(
const QRectF ®ion )
const;
107 QList< int > visiblePageNumbers(
const QRectF ®ion )
const;
114 bool pageIsEmpty(
int page )
const;
119 QList< QgsLayoutItem *> itemsOnPage(
int page )
const;
128 const QList<QGraphicsItem *> graphicsItemList = mLayout->items();
129 for ( QGraphicsItem *graphicsItem : graphicsItemList )
131 T *item =
dynamic_cast<T *
>( graphicsItem );
132 if ( item && item->page() == page )
134 itemList.push_back( item );
147 bool shouldExportPage(
int page )
const;
201 void deletePage(
int pageNumber );
246 void beginPageSizeChange();
254 void endPageSizeChange();
268 double maximumPageWidth() const;
276 QSizeF maximumPageSize() const;
284 bool hasUniformPageSizes() const;
300 int pageNumberForPoint( QPointF point ) const;
317 int predictPageNumberForPoint( QPointF point ) const;
335 QPointF pagePositionToLayoutPosition(
int page, const
QgsLayoutPoint &position ) const;
348 QPointF positionOnPage( QPointF point ) const;
353 double spaceBetweenPages() const;
358 double pageShadowWidth() const;
368 void resizeToContents( const
QgsMargins &margins,
Qgis::LayoutUnit marginUnits );
374 bool writeXml( QDomElement &parentElement, QDomDocument &document, const
QgsReadWriteContext &context ) const override;
380 bool readXml( const QDomElement &collectionElement, const QDomDocument &document, const
QgsReadWriteContext &context ) override;
412 void pageAboutToBeRemoved(
int pageNumber );
425 bool mBlockUndoCommands = false;
427 QMap< QString, QPair<
int,
QgsLayoutPoint > > mPreviousItemPositions;
429 void createDefaultPageStyleSymbol();
431 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.