QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
Go to the documentation of this file.
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;
125 void refreshSymbol();
128 void updateBoundingRect();
132 Shape mShape = Rectangle;
134 std::unique_ptr< QgsFillSymbol > mShapeStyleSymbol;
136 double mMaxSymbolBleed = 0.0;
138 QRectF mCurrentRectangle;
144 #endif //QGSLAYOUTITEMSHAPE_H
Layout item for basic filled shapes (e.g. rectangles, ellipses).
virtual bool writePropertiesToElement(QDomElement &element, QDomDocument &document, const QgsReadWriteContext &context) const
Stores item state within an XML DOM element.
virtual QIcon icon() const
Returns the item's icon.
void setCornerRadius(QgsLayoutMeasurement radius)
Sets the corner radius for rounded rectangle corners.
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 double estimatedFrameBleed() const
Returns the estimated amount the item's frame bleeds outside the item's actual rectangle.
virtual bool accept(QgsStyleEntityVisitorInterface *visitor) const
Accepts the specified style entity visitor, causing it to visit all style entities associated with th...
Base class for graphical items within a QgsLayout.
@ Rectangle
Rectangle shape.
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
virtual QString displayName() const
Gets item display name.
QgsFillSymbol * symbol()
Returns the fill symbol used to draw the shape.
QgsLayoutItemShape::Shape shapeType() const
Returns the type of shape (e.g.
QgsLayoutMeasurement cornerRadius() const
Returns the corner radius for rounded rectangle corners.
This class provides a method of storing measurements for use in QGIS layouts using a variety of diffe...