17 #ifndef QGSLAYOUTITEMSHAPE_H 18 #define QGSLAYOUTITEMSHAPE_H 20 #include "qgis_core.h" 60 int type()
const override;
61 QIcon
icon()
const override;
104 QRectF boundingRect()
const override;
123 void refreshSymbol();
126 void updateBoundingRect();
130 Shape mShape = Rectangle;
132 std::unique_ptr< QgsFillSymbol > mShapeStyleSymbol;
134 double mMaxSymbolBleed = 0.0;
136 QRectF mCurrentRectangle;
142 #endif //QGSLAYOUTITEMSHAPE_H The class is used as a container of context for various read/write operations on other objects...
QgsLayoutMeasurement cornerRadius() const
Returns the corner radius for rounded rectangle corners.
virtual QIcon icon() const
Returns the item's icon.
Base class for graphical items within a QgsLayout.
int type() const override
Returns a unique graphics item type identifier.
virtual bool writePropertiesToElement(QDomElement &element, QDomDocument &document, const QgsReadWriteContext &context) const
Stores item state within an XML DOM element.
This class provides a method of storing measurements for use in QGIS layouts using a variety of diffe...
virtual bool readPropertiesFromElement(const QDomElement &element, const QDomDocument &document, const QgsReadWriteContext &context)
Sets item state from a DOM element.
Layout item for basic filled shapes (e.g.
QgsLayoutItemShape::Shape shapeType() const
Returns the type of shape (e.g.
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.
QgsFillSymbol * symbol()
Returns the fill symbol used to draw the shape.
virtual double estimatedFrameBleed() const
Returns the estimated amount the item's frame bleeds outside the item's actual rectangle.
virtual QString displayName() const
Gets item display name.
virtual void draw(QgsLayoutItemRenderContext &context)=0
Draws the item's contents using the specified item render context.
A fill symbol type, for rendering Polygon and MultiPolygon geometries.
void setCornerRadius(QgsLayoutMeasurement radius)
Sets the corner radius for rounded rectangle corners.