Class: QgsLayoutNorthArrowHandler

class qgis.core.QgsLayoutNorthArrowHandler(parent: QObject)

Bases: PyQt5.QtCore.QObject

Constructor for QgsLayoutNorthArrowHandler, with the specified parent object.

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

New in version 3.14.

Parameters

parent

GridNorth = 0
class NorthMode

Bases: int

TrueNorth = 1
arrowRotation(self) → float

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

Return type

float

arrowRotationChanged

Emitted on arrow rotation change [signal]

Parameters

newRotation (float) –

childEvent(self, QChildEvent)
connectNotify(self, QMetaMethod)
customEvent(self, QEvent)
disconnectNotify(self, QMetaMethod)
isSignalConnected(self, QMetaMethod) → bool
linkedMap(self)QgsLayoutItemMap

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

See also

setLinkedMap()

Return type

QgsLayoutItemMap

northMode(self) → QgsLayoutNorthArrowHandler.NorthMode

Returns the mode used to calculate the arrow rotation.

See also

setNorthMode()

See also

northOffset()

Return type

QgsLayoutNorthArrowHandler.NorthMode

northOffset(self) → float

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

See also

setNorthOffset()

See also

northMode()

Return type

float

receivers(self, PYQT_SIGNAL) → int
sender(self) → QObject
senderSignalIndex(self) → int
setLinkedMap(self, map: QgsLayoutItemMap)

Sets the linked map item.

See also

linkedMap()

Parameters

map (QgsLayoutItemMap) –

setNorthMode(self, mode: QgsLayoutNorthArrowHandler.NorthMode)

Sets the mode used to calculate the arrow rotation.

See also

northMode()

See also

setNorthOffset()

Parameters

mode (QgsLayoutNorthArrowHandler.NorthMode) –

setNorthOffset(self, offset: float)

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

See also

northOffset()

See also

setNorthMode()

Parameters

offset (float) –

timerEvent(self, QTimerEvent)