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

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[source]

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

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)