17#ifndef QGSLAYOUTITEMMARKER_H
18#define QGSLAYOUTITEMMARKER_H
52 int type()
const override;
53 QIcon
icon()
const override;
113 double northOffset()
const;
120 void setNorthOffset(
double offset );
123 QRectF boundingRect()
const override;
142 void refreshSymbol();
145 void updateBoundingRect();
147 void northArrowRotationChanged(
double rotation );
150 std::unique_ptr< QgsMarkerSymbol > mShapeStyleSymbol;
153 QRectF mCurrentRectangle;
156 QString mRotationMapUuid;
158 double mNorthArrowRotation = 0;
A layout item for showing marker symbols.
~QgsLayoutItemMarker() override
void setLinkedMap(QgsLayoutItemMap *map)
Sets the map object for rotation.
double northArrowRotation() const
When the marker is linked to a map in north arrow rotation mode, returns the current north arrow rota...
QgsLayoutItemMarker(QgsLayout *layout)
Constructor for QgsLayoutItemMarker, with the specified parent layout.
static QgsLayoutItemMarker * create(QgsLayout *layout)
Returns a new marker item for the specified layout.
QgsLayoutItemMap * linkedMap() const
Returns the linked rotation map, if set.
void setSymbol(QgsMarkerSymbol *symbol)
Sets the marker symbol used to draw the shape.
QgsMarkerSymbol * symbol()
Returns the marker symbol used to draw the shape.
Contains settings and helpers relating to a render of a QgsLayoutItem.
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.
friend class QgsLayoutItemMap
virtual bool writePropertiesToElement(QDomElement &element, QDomDocument &document, const QgsReadWriteContext &context) const
Stores item state within an XML DOM element.
virtual void finalizeRestoreFromXml()
Called after all pending items have been restored from XML.
int type() const override
Returns a unique graphics item type identifier.
virtual QgsLayoutSize fixedSize() const
Returns the fixed size of the item, if applicable, or an empty size if item can be freely resized.
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.
An object which handles north-arrow type behavior for layout items.
NorthMode
Method for syncing rotation to a map's North direction.
const QgsLayout * layout() const
Returns the layout the object is attached to.
Provides a method of storing sizes, consisting of a width and height, for use in QGIS layouts.
A marker symbol type, for rendering Point and MultiPoint geometries.
A container for the context for various read/write operations on objects.
An interface for classes which can visit style entity (e.g.