Class: QgsLayoutItemMarker

class qgis.core.QgsLayoutItemMarker(layout: QgsLayout)

Bases: QgsLayoutItem

Constructor for QgsLayoutItemMarker, with the specified parent layout.

A layout item for showing marker symbols.

New in version 3.14.

Parameters

layout

accept(self, visitor: QgsStyleEntityVisitorInterface) → bool
Parameters

visitor (QgsStyleEntityVisitorInterface) –

Return type

bool

adjustPointForReferencePosition()
applyDataDefinedSize()
applyItemSizeConstraint()
boundingRect(self) → QRectF
Return type

QRectF

childEvent()
connectNotify()
contextMenuEvent()
create(layout: QgsLayout)QgsLayoutItemMarker

Returns a new marker item for the specified layout.

The caller takes responsibility for deleting the returned object.

Parameters

layout (QgsLayout) –

Return type

QgsLayoutItemMarker

customEvent()
disconnectNotify()
dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
draw(self, context: QgsLayoutItemRenderContext)
Parameters

context (QgsLayoutItemRenderContext) –

drawBackground()
drawDebugRect()
drawFrame()
dropEvent()
finalizeRestoreFromXml(self)
fixedSize(self)QgsLayoutSize
Return type

QgsLayoutSize

focusInEvent()
focusOutEvent()
hoverEnterEvent()
hoverLeaveEvent()
hoverMoveEvent()
icon(self) → QIcon
Return type

QIcon

inputMethodEvent()
inputMethodQuery()
isSignalConnected()
itemChange()
keyPressEvent()
keyReleaseEvent()
linkedMap(self)QgsLayoutItemMap

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

setLinkedMap()

Return type

QgsLayoutItemMap

mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
northArrowRotation(self) → float

When the marker is linked to a map in north arrow rotation mode, returns the current north arrow rotation for the marker.

See also

setLinkedMap()

Return type

float

northMode(self) → QgsLayoutNorthArrowHandler.NorthMode

Returns the mode used to align the marker to a map’s North.

See also

setNorthMode()

See also

northOffset()

Return type

QgsLayoutNorthArrowHandler.NorthMode

northOffset(self) → float

Returns the offset added to the marker’s rotation from a map’s North.

See also

setNorthOffset()

See also

northMode()

Return type

float

positionAtReferencePoint()
prepareGeometryChange()
readObjectPropertiesFromElement()
readPropertiesFromElement(self, element: QDomElement, document: QDomDocument, context: QgsReadWriteContext) → bool
Parameters
Return type

bool

receivers()
refreshBackgroundColor()
refreshBlendMode()
refreshFrame()
refreshItemPosition()
refreshItemRotation()
refreshItemSize()
refreshOpacity()
sceneEvent()
sceneEventFilter()
sender()
senderSignalIndex()
setFixedSize()
setLinkedMap(self, map: QgsLayoutItemMap)

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

linkedMap()

Parameters

map (QgsLayoutItemMap) –

setMinimumSize()
setNorthMode(self, mode: QgsLayoutNorthArrowHandler.NorthMode)

Sets the mode used to align the marker to a map’s North.

See also

northMode()

See also

setNorthOffset()

Parameters

mode (QgsLayoutNorthArrowHandler.NorthMode) –

setNorthOffset(self, offset: float)

Sets the offset added to the marker’s rotation from a map’s North.

See also

northOffset()

See also

setNorthMode()

Parameters

offset (float) –

setSymbol(self, symbol: QgsMarkerSymbol)

Sets the marker symbol used to draw the shape. Ownership is transferred.

See also

symbol()

Parameters

symbol (QgsMarkerSymbol) –

symbol(self)QgsMarkerSymbol

Returns the marker symbol used to draw the shape.

See also

setSymbol()

Return type

QgsMarkerSymbol

timerEvent()
topLeftToReferencePoint()
type(self) → int
Return type

int

updateMicroFocus()
wheelEvent()
writeObjectPropertiesToElement()
writePropertiesToElement(self, element: QDomElement, document: QDomDocument, context: QgsReadWriteContext) → bool
Parameters
Return type

bool