17#ifndef QGSLAYOUTITEMSHAPE_H
18#define QGSLAYOUTITEMSHAPE_H
60 int type()
const override;
61 QIcon
icon()
const override;
107 QRectF boundingRect()
const override;
131 void refreshSymbol(
bool redraw );
134 void updateBoundingRect();
138 Shape mShape = Rectangle;
140 std::unique_ptr< QgsFillSymbol > mShapeStyleSymbol;
142 double mMaxSymbolBleed = 0.0;
144 QRectF mCurrentRectangle;
148 QPolygonF calculatePolygon(
double scale )
const;
A fill symbol type, for rendering Polygon and MultiPolygon geometries.
A geometry is the spatial representation of a feature.
Contains settings and helpers relating to a render of a QgsLayoutItem.
Layout item for basic filled shapes (e.g.
static QgsLayoutItemShape * create(QgsLayout *layout)
Returns a new shape item for the specified layout.
QgsFillSymbol * symbol()
Returns the fill symbol used to draw the shape.
~QgsLayoutItemShape() override
QgsLayoutItemShape(QgsLayout *layout)
Constructor for QgsLayoutItemShape, with the specified parent layout.
QgsLayoutMeasurement cornerRadius() const
Returns the corner radius for rounded rectangle corners.
@ Rectangle
Rectangle shape.
@ Triangle
Triangle shape.
QgsLayoutItemShape::Shape shapeType() const
Returns the type of shape (e.g.
virtual QgsGeometry clipPath() const
Returns the clipping path generated by this item, in layout coordinates.
virtual bool accept(QgsStyleEntityVisitorInterface *visitor) const
Accepts the specified style entity visitor, causing it to visit all style entities associated with th...
QgsLayoutItem(QgsLayout *layout, bool manageZValue=true)
Constructor for QgsLayoutItem, with the specified parent layout.
virtual QIcon icon() const
Returns the item's icon.
virtual bool writePropertiesToElement(QDomElement &element, QDomDocument &document, const QgsReadWriteContext &context) const
Stores item state within an XML DOM element.
int type() const override
Returns a unique graphics item type identifier.
virtual QString displayName() const
Gets item display name.
virtual Flags itemFlags() const
Returns the item's flags, which indicate how the item behaves.
virtual bool readPropertiesFromElement(const QDomElement &element, const QDomDocument &document, const QgsReadWriteContext &context)
Sets item state from a DOM element.
virtual double estimatedFrameBleed() const
Returns the estimated amount the item's frame bleeds outside the item's actual rectangle.
virtual void draw(QgsLayoutItemRenderContext &context)=0
Draws the item's contents using the specified item render context.
Provides a method of storing measurements for use in QGIS layouts using a variety of different measur...
const QgsLayout * layout() const
Returns the layout the object is attached to.
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
A container for the context for various read/write operations on objects.
An interface for classes which can visit style entity (e.g.