Class: QgsLayoutItemMarker¶
A layout item for showing marker symbols.
Added in version 3.14.
Class Hierarchy¶
Base classes¶
Base class for graphical items within a |
|
A base class for objects which belong to a layout. |
|
Abstract interface for generating an expression context. |
|
Interface for layout objects which support undo/redo commands. |
Methods
Returns the linked rotation map, if set. |
|
When the marker is linked to a map in north arrow rotation mode, returns the current north arrow rotation for the marker. |
|
Returns the mode used to align the marker to a map's North. |
|
Returns the offset added to the marker's rotation from a map's North. |
|
Sets the map object for rotation. |
|
Sets the mode used to align the marker to a map's North. |
|
Sets the offset added to the marker's rotation from a map's North. |
|
Sets the marker symbol used to draw the shape. |
|
Returns the marker symbol used to draw the shape. |
Static Methods
Returns a new marker item for the specified layout. |
- class qgis.core.QgsLayoutItemMarker[source]¶
Bases:
QgsLayoutItem
- __init__(layout: QgsLayout | None)
Constructor for QgsLayoutItemMarker, with the specified parent
layout
.- Parameters:
layout (Optional[QgsLayout])
- static create(layout: QgsLayout | None) QgsLayoutItemMarker | None [source]¶
Returns a new marker item for the specified
layout
.The caller takes responsibility for deleting the returned object.
- Parameters:
layout (Optional[QgsLayout])
- Return type:
Optional[QgsLayoutItemMarker]
- linkedMap(self) QgsLayoutItemMap | None [source]¶
Returns the linked rotation map, if set. An
None
means map rotation is disabled. If this is set then the marker is rotated by the same amount as the specified map object.See also
- Return type:
Optional[QgsLayoutItemMap]
- northArrowRotation(self) float [source]¶
When the marker is linked to a map in north arrow rotation mode, returns the current north arrow rotation for the marker.
See also
- Return type:
float
- northMode(self) QgsLayoutNorthArrowHandler.NorthMode [source]¶
Returns the mode used to align the marker to a map’s North.
See also
See also
- Return type:
- northOffset(self) float [source]¶
Returns the offset added to the marker’s rotation from a map’s North.
See also
See also
- Return type:
float
- setLinkedMap(self, map: QgsLayoutItemMap | None)[source]¶
Sets the
map
object for rotation.If this is set then the marker will be rotated by the same amount as the specified map object. This is useful especially for syncing north arrows with a map item.
See also
- Parameters:
map (Optional[QgsLayoutItemMap])
- setNorthMode(self, mode: QgsLayoutNorthArrowHandler.NorthMode)[source]¶
Sets the
mode
used to align the marker to a map’s North.See also
See also
- Parameters:
- setNorthOffset(self, offset: float)[source]¶
Sets the
offset
added to the marker’s rotation from a map’s North.See also
See also
- Parameters:
offset (float)
- setSymbol(self, symbol: QgsMarkerSymbol | None)[source]¶
Sets the marker
symbol
used to draw the shape. Ownership is transferred.See also
- Parameters:
symbol (Optional[QgsMarkerSymbol])
- symbol(self) QgsMarkerSymbol | None [source]¶
Returns the marker symbol used to draw the shape.
See also
- Return type:
Optional[QgsMarkerSymbol]