QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
17 #ifndef QGSLAYOUTITEMSHAPE_H
18 #define QGSLAYOUTITEMSHAPE_H
20 #include "qgis_core.h"
61 int type()
const override;
62 QIcon
icon()
const override;
66 QgsLayoutItem::Flags
itemFlags()
const override;
108 QRectF boundingRect()
const override;
132 void refreshSymbol(
bool redraw );
135 void updateBoundingRect();
139 Shape mShape = Rectangle;
141 std::unique_ptr< QgsFillSymbol > mShapeStyleSymbol;
143 double mMaxSymbolBleed = 0.0;
145 QRectF mCurrentRectangle;
149 QPolygonF calculatePolygon(
double scale )
const;
153 #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.
The class is used as a container of context for various read/write operations on other objects.
virtual QIcon icon() const
Returns the item's icon.
Contains settings and helpers relating to a render of a QgsLayoutItem.
An interface for classes which can visit style entity (e.g. symbol) nodes (using the visitor pattern)...
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 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...
Base class for graphical items within a QgsLayout.
@ Rectangle
Rectangle shape.
virtual Flags itemFlags() const
Returns the item's flags, which indicate how the item behaves.
A geometry is the spatial representation of a feature.
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
virtual QString displayName() const
Gets item display name.
A fill symbol type, for rendering Polygon and MultiPolygon geometries.
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...