Class: QgsLayoutNorthArrowHandler

An object which handles north-arrow type behavior for layout items.

Added in version 3.14.

Class Hierarchy

Inheritance diagram of qgis.core.QgsLayoutNorthArrowHandler

Base classes

QObject

Methods

arrowRotation

Returns the rotation to be used for the arrow, in degrees clockwise.

linkedMap

Returns the linked rotation map, if set.

northMode

Returns the mode used to calculate the arrow rotation.

northOffset

Returns the offset added to the arrows's rotation from a map's North.

setLinkedMap

Sets the linked map item.

setNorthMode

Sets the mode used to calculate the arrow rotation.

setNorthOffset

Sets the offset added to the arrows's rotation from a map's North.

Signals

arrowRotationChanged

Emitted on arrow rotation change

Attributes

GridNorth

TrueNorth

class qgis.core.QgsLayoutNorthArrowHandler[source]

Bases: QObject

__init__(parent: QObject | None)

Constructor for QgsLayoutNorthArrowHandler, with the specified parent object.

Parameters:

parent (Optional[QObject])

GridNorth = 0
class NorthMode

Bases: int

TrueNorth = 1
arrowRotation(self) float[source]

Returns the rotation to be used for the arrow, in degrees clockwise.

Return type:

float

signal arrowRotationChanged(newRotation: float)[source]

Emitted on arrow rotation change

Parameters:

newRotation (float)

linkedMap(self) QgsLayoutItemMap | None[source]

Returns the linked rotation map, if set. An None means arrow calculation is disabled.

See also

setLinkedMap()

Return type:

Optional[QgsLayoutItemMap]

northMode(self) QgsLayoutNorthArrowHandler.NorthMode[source]

Returns the mode used to calculate the arrow rotation.

See also

setNorthMode()

See also

northOffset()

Return type:

QgsLayoutNorthArrowHandler.NorthMode

northOffset(self) float[source]

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

See also

setNorthOffset()

See also

northMode()

Return type:

float

setLinkedMap(self, map: QgsLayoutItemMap | None)[source]

Sets the linked map item.

See also

linkedMap()

Parameters:

map (Optional[QgsLayoutItemMap])

setNorthMode(self, mode: QgsLayoutNorthArrowHandler.NorthMode)[source]

Sets the mode used to calculate the arrow rotation.

See also

northMode()

See also

setNorthOffset()

Parameters:

mode (QgsLayoutNorthArrowHandler.NorthMode)

setNorthOffset(self, offset: float)[source]

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

See also

northOffset()

See also

setNorthMode()

Parameters:

offset (float)