QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
17 #ifndef QGSLAYOUTITEMPAGE_H
18 #define QGSLAYOUTITEMPAGE_H
20 #include <QPageLayout>
22 #include "qgis_core.h"
39 class CORE_EXPORT QgsLayoutItemPageGrid:
public QGraphicsRectItem
42 QgsLayoutItemPageGrid(
double x,
double y,
double width,
double height,
QgsLayout *layout );
44 void paint( QPainter *painter,
const QStyleOptionGraphicsItem *itemStyle, QWidget *pWidget )
override;
75 UndoPageSymbol = 3000,
91 int type()
const override;
109 bool setPageSize(
const QString &size, Orientation orientation = Portrait );
115 QPageLayout pageLayout()
const;
127 Orientation orientation()
const;
156 QRectF boundingRect()
const override;
159 ExportLayerBehavior exportLayerBehavior() const override;
164 void redraw() override;
171 bool writePropertiesToElement( QDomElement &parentElement, QDomDocument &document, const
QgsReadWriteContext &context ) const override;
172 bool readPropertiesFromElement( const QDomElement &itemElement, const QDomDocument &document, const
QgsReadWriteContext &context ) override;
176 double mMaximumShadowWidth = -1;
178 std::
unique_ptr< QgsLayoutItemPageGrid > mGrid;
179 mutable QRectF mBoundingRect;
184 void createDefaultPageStyleSymbol();
186 friend class TestQgsLayoutPage;
189 #endif //QGSLAYOUTITEMPAGE_H
UndoCommand
Layout item undo commands, used for collapsing undo commands.
Item representing the paper in a layout.
The class is used as a container of context for various read/write operations on other objects.
Contains settings and helpers relating to a render of a QgsLayoutItem.
Contains information about the context of a rendering operation.
An interface for classes which can visit style entity (e.g. symbol) nodes (using the visitor pattern)...
int type() const override
Returns a unique graphics item type identifier.
std::unique_ptr< GEOSGeometry, GeosDeleter > unique_ptr
Scoped GEOS pointer.
const QgsFillSymbol * pageStyleSymbol() const
Returns the symbol to use for drawing the page background.
Base class for graphical items within a QgsLayout.
Base class for commands to undo/redo layout and layout object changes.
Orientation
Page orientation.
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
virtual QString displayName() const
Gets item display name.
@ Portrait
Portrait orientation.
A fill symbol type, for rendering Polygon and MultiPolygon geometries.
virtual void attemptResize(const QgsLayoutSize &size, bool includesFrame=false)
Attempts to resize the item to a specified target size.
This class provides a method of storing sizes, consisting of a width and height, for use in QGIS layo...
QgsAbstractLayoutUndoCommand * createCommand(const QString &text, int id, QUndoCommand *parent=nullptr) override
Creates a new layout undo command with the specified text and parent.