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 The class is used as a container of context for various read/write operations on other objects...
Base class for graphical items within a QgsLayout.
int type() const override
Returns a unique graphics item type identifier.
A container for grouping several QgsLayoutItems.
virtual void setVisibility(const bool visible)
Sets whether the item is visible.
This class provides a method of storing points, consisting of an x and y coordinate, for use in QGIS layouts.
virtual bool readPropertiesFromElement(const QDomElement &element, const QDomDocument &document, const QgsReadWriteContext &context)
Sets item state from a DOM element.
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.
virtual void cleanup()
Called just before a batch of items are deleted, allowing them to run cleanup tasks.
virtual void attemptResize(const QgsLayoutSize &size, bool includesFrame=false)
Attempts to resize the item to a specified target size.
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
Contains settings and helpers relating to a render of a QgsLayoutItem.
virtual void finalizeRestoreFromXml()
Called after all pending items have been restored from XML.
virtual QString displayName() const
Get item display name.
virtual void attemptMove(const QgsLayoutPoint &point, bool useReferencePoint=true, bool includesFrame=false, int page=-1)
Attempts to move the item to a specified point.
virtual bool writePropertiesToElement(QDomElement &element, QDomDocument &document, const QgsReadWriteContext &context) const
Stores item state within an XML DOM element.
friend class QgsLayoutItemGroup
virtual void draw(QgsLayoutItemRenderContext &context)=0
Draws the item's contents using the specified item render context.
This class provides a method of storing sizes, consisting of a width and height, for use in QGIS layo...