17#ifndef QGSLAYOUTITEMPAGE_H
18#define QGSLAYOUTITEMPAGE_H
37class CORE_EXPORT QgsLayoutItemPageGrid:
public QGraphicsRectItem
40 QgsLayoutItemPageGrid(
double x,
double y,
double width,
double height, QgsLayout *layout );
42 void paint( QPainter *painter,
const QStyleOptionGraphicsItem *itemStyle, QWidget *pWidget )
override;
45 QgsLayout *mLayout =
nullptr;
88 int type()
const override;
153 QRectF boundingRect()
const override;
154 void attemptResize(
const QgsLayoutSize &size,
bool includesFrame =
false )
override;
156 ExportLayerBehavior exportLayerBehavior() const override;
161 void redraw() override;
168 bool writePropertiesToElement( QDomElement &parentElement, QDomDocument &document, const
QgsReadWriteContext &context ) const override;
169 bool readPropertiesFromElement( const QDomElement &itemElement, const QDomDocument &document, const
QgsReadWriteContext &context ) override;
173 double mMaximumShadowWidth = -1;
175 std::unique_ptr< QgsLayoutItemPageGrid > mGrid;
176 mutable QRectF mBoundingRect;
181 void createDefaultPageStyleSymbol();
Base class for commands to undo/redo layout and layout object changes.
A fill symbol type, for rendering Polygon and MultiPolygon geometries.
Item representing the paper in a layout.
friend class TestQgsLayoutPage
~QgsLayoutItemPage() override
void setPageSize(const QgsLayoutSize &size)
Sets the size of the page.
int type() const override
QgsLayoutSize pageSize() const
Returns the size of the page.
const QgsFillSymbol * pageStyleSymbol() const
Returns the symbol to use for drawing the page background.
Orientation orientation() const
Returns the page orientation.
QString displayName() const override
Gets item display name.
static QgsLayoutItemPage * create(QgsLayout *layout)
Returns a new page item for the specified layout.
QgsLayoutItemPage(QgsLayout *layout)
Constructor for QgsLayoutItemPage, with the specified parent layout.
void setPageStyleSymbol(QgsFillSymbol *symbol)
Sets the symbol to use for drawing the page background.
Orientation
Page orientation.
@ Landscape
Landscape orientation.
@ Portrait
Portrait orientation.
QPageLayout pageLayout() const
Returns the page layout for the page, suitable to pass to QPrinter::setPageLayout.
UndoCommand
Page item undo commands, used for collapsing undo commands.
@ UndoPageSymbol
Layout page symbol change.
Contains settings and helpers relating to a render of a QgsLayoutItem.
QgsLayoutItem(QgsLayout *layout, bool manageZValue=true)
Constructor for QgsLayoutItem, with the specified parent layout.
const QgsLayout * layout() const
Returns the layout the object is attached to.
Provides a method of storing sizes, consisting of a width and height, for use in QGIS layouts.
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
A container for the context for various read/write operations on objects.
Contains information about the context of a rendering operation.
An interface for classes which can visit style entity (e.g.