QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
17 #ifndef QGSLAYOUTITEMGROUP_H
18 #define QGSLAYOUTITEMGROUP_H
20 #include "qgis_core.h"
41 int type()
const override;
66 QList<QgsLayoutItem *> items()
const;
72 void attemptMove(
const QgsLayoutPoint &point,
bool useReferencePoint =
true,
bool includesFrame =
false,
int page = -1 )
override;
75 void paint( QPainter *painter,
const QStyleOptionGraphicsItem *itemStyle, QWidget *pWidget )
override;
86 void resetBoundingRect();
88 void setSceneRect(
const QRectF &rectangle );
90 QList< QString > mItemUuids;
91 QList< QPointer< QgsLayoutItem >> mItems;
92 QRectF mBoundingRectangle;
95 #endif //QGSLAYOUTITEMGROUP_H
virtual void cleanup()
Called just before a batch of items are deleted, allowing them to run cleanup tasks.
virtual bool writePropertiesToElement(QDomElement &element, QDomDocument &document, const QgsReadWriteContext &context) const
Stores item state within an XML DOM element.
The class is used as a container of context for various read/write operations on other objects.
virtual void finalizeRestoreFromXml()
Called after all pending items have been restored from XML.
Contains settings and helpers relating to a render of a QgsLayoutItem.
virtual bool readPropertiesFromElement(const QDomElement &element, const QDomDocument &document, const QgsReadWriteContext &context)
Sets item state from a DOM element.
virtual void draw(QgsLayoutItemRenderContext &context)=0
Draws the item's contents using the specified item render context.
int type() const override
Returns a unique graphics item type identifier.
virtual ExportLayerBehavior exportLayerBehavior() const
Returns the behavior of this item during exporting to layered exports (e.g.
ExportLayerBehavior
Behavior of item when exporting to layered outputs.
virtual void setVisibility(bool visible)
Sets whether the item is visible.
void paint(QPainter *painter, const QStyleOptionGraphicsItem *itemStyle, QWidget *pWidget) override
Handles preparing a paint surface for the layout item and painting the item's content.
Base class for graphical items within a QgsLayout.
A container for grouping several QgsLayoutItems.
virtual void attemptMove(const QgsLayoutPoint &point, bool useReferencePoint=true, bool includesFrame=false, int page=-1)
Attempts to move the item to a specified point.
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
virtual QString displayName() const
Gets item display name.
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...
friend class QgsLayoutItemGroup
This class provides a method of storing points, consisting of an x and y coordinate,...