QGIS API Documentation 3.41.0-Master (af5edcb665c)
|
An object which handles north-arrow type behavior for layout items. More...
#include <qgslayoutnortharrowhandler.h>
Public Types | |
enum | NorthMode { GridNorth = 0 , TrueNorth } |
Method for syncing rotation to a map's North direction. More... | |
Signals | |
void | arrowRotationChanged (double newRotation) |
Emitted on arrow rotation change. | |
Public Member Functions | |
QgsLayoutNorthArrowHandler (QObject *parent) | |
Constructor for QgsLayoutNorthArrowHandler, with the specified parent object. | |
double | arrowRotation () const |
Returns the rotation to be used for the arrow, in degrees clockwise. | |
QgsLayoutItemMap * | linkedMap () const |
Returns the linked rotation map, if set. | |
NorthMode | northMode () const |
Returns the mode used to calculate the arrow rotation. | |
double | northOffset () const |
Returns the offset added to the arrows's rotation from a map's North. | |
void | setLinkedMap (QgsLayoutItemMap *map) |
Sets the linked map item. | |
void | setNorthMode (NorthMode mode) |
Sets the mode used to calculate the arrow rotation. | |
void | setNorthOffset (double offset) |
Sets the offset added to the arrows's rotation from a map's North. | |
An object which handles north-arrow type behavior for layout items.
Definition at line 32 of file qgslayoutnortharrowhandler.h.
Method for syncing rotation to a map's North direction.
Enumerator | |
---|---|
GridNorth | Align to grid north. |
TrueNorth | Align to true north. |
Definition at line 38 of file qgslayoutnortharrowhandler.h.
QgsLayoutNorthArrowHandler::QgsLayoutNorthArrowHandler | ( | QObject * | parent | ) |
Constructor for QgsLayoutNorthArrowHandler, with the specified parent object.
Definition at line 25 of file qgslayoutnortharrowhandler.cpp.
|
inline |
Returns the rotation to be used for the arrow, in degrees clockwise.
Definition at line 52 of file qgslayoutnortharrowhandler.h.
|
signal |
Emitted on arrow rotation change.
QgsLayoutItemMap * QgsLayoutNorthArrowHandler::linkedMap | ( | ) | const |
Returns the linked rotation map, if set.
An nullptr
means arrow calculation is disabled.
Definition at line 108 of file qgslayoutnortharrowhandler.cpp.
|
inline |
Returns the mode used to calculate the arrow rotation.
Definition at line 74 of file qgslayoutnortharrowhandler.h.
|
inline |
Returns the offset added to the arrows's rotation from a map's North.
Definition at line 88 of file qgslayoutnortharrowhandler.h.
void QgsLayoutNorthArrowHandler::setLinkedMap | ( | QgsLayoutItemMap * | map | ) |
Sets the linked map item.
Definition at line 82 of file qgslayoutnortharrowhandler.cpp.
void QgsLayoutNorthArrowHandler::setNorthMode | ( | QgsLayoutNorthArrowHandler::NorthMode | mode | ) |
Sets the mode used to calculate the arrow rotation.
Definition at line 113 of file qgslayoutnortharrowhandler.cpp.
void QgsLayoutNorthArrowHandler::setNorthOffset | ( | double | offset | ) |
Sets the offset added to the arrows's rotation from a map's North.
Definition at line 119 of file qgslayoutnortharrowhandler.cpp.