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
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_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¶
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, 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)¶