Class: QgsLayoutNorthArrowHandler

class qgis.core.QgsLayoutNorthArrowHandler

Bases: PyQt5.QtCore.QObject

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

Added in version 3.14.

QgsLayoutNorthArrowHandler(parent: Optional[QObject]) Constructor for QgsLayoutNorthArrowHandler, with the specified parent object.

Methods

arrowRotation

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

childEvent

connectNotify

customEvent

disconnectNotify

isSignalConnected

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.

receivers

sender

senderSignalIndex

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.

timerEvent

Signals

arrowRotationChanged

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

Attributes

GridNorth

TrueNorth

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

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.

Parameters:
  • name (str = ...)

  • revision (int = ...)

  • arguments (Sequence = ...)

Return type:

PYQT_SIGNAL

childEvent(self, a0: QChildEvent | None)
connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent | None)
disconnectNotify(self, signal: QMetaMethod)
isSignalConnected(self, signal: QMetaMethod) bool
linkedMap(self) QgsLayoutItemMap | None

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

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, signal: PYQT_SIGNAL) int
sender(self) QObject | None
senderSignalIndex(self) int
setLinkedMap(self, map: QgsLayoutItemMap | None)

Sets the linked map item.

See also

linkedMap()

Parameters:

map (Optional[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, a0: QTimerEvent | None)