Class: QgsLayoutNorthArrowHandler¶
- class qgis.core.QgsLayoutNorthArrowHandler¶
Bases:
PyQt5.QtCore.QObject
An object which handles north-arrow type behavior for layout items.
New in version 3.14.
QgsLayoutNorthArrowHandler(parent: QObject) Constructor for
QgsLayoutNorthArrowHandler
, with the specified parentobject
.Methods
Returns the rotation to be used for the arrow, in degrees clockwise.
Returns the linked rotation map, if set.
Returns the mode used to calculate the arrow rotation.
Returns the offset added to the arrows's rotation from a map's North.
Sets the linked
map
item.Sets the
mode
used to calculate the arrow rotation.Sets the
offset
added to the arrows's rotation from a map's North.Signals
Emitted on arrow rotation change [signal]
Attributes
- 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
- Return type
- northMode(self) QgsLayoutNorthArrowHandler.NorthMode ¶
Returns the mode used to calculate the arrow rotation.
See also
See also
- Return type
- northOffset(self) float ¶
Returns the offset added to the arrows’s rotation from a map’s North.
See also
See also
- 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
- Parameters
map (QgsLayoutItemMap) –
- setNorthMode(self, mode: QgsLayoutNorthArrowHandler.NorthMode)¶
Sets the
mode
used to calculate the arrow rotation.See also
See also
- Parameters
mode (QgsLayoutNorthArrowHandler.NorthMode) –
- setNorthOffset(self, offset: float)¶
Sets the
offset
added to the arrows’s rotation from a map’s North.See also
See also
- Parameters
offset (float) –
- timerEvent(self, QTimerEvent)¶