QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
QgsLayoutNorthArrowHandler Class Reference

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

#include <qgslayoutnortharrowhandler.h>

Inheritance diagram for QgsLayoutNorthArrowHandler:

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.
QgsLayoutItemMaplinkedMap () 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.

Detailed Description

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

Since
QGIS 3.14

Definition at line 33 of file qgslayoutnortharrowhandler.h.

Member Enumeration Documentation

◆ NorthMode

Method for syncing rotation to a map's North direction.

Enumerator
GridNorth 

Align to grid north.

TrueNorth 

Align to true north.

Definition at line 39 of file qgslayoutnortharrowhandler.h.

Constructor & Destructor Documentation

◆ QgsLayoutNorthArrowHandler()

QgsLayoutNorthArrowHandler::QgsLayoutNorthArrowHandler ( QObject * parent)

Constructor for QgsLayoutNorthArrowHandler, with the specified parent object.

Definition at line 27 of file qgslayoutnortharrowhandler.cpp.

Member Function Documentation

◆ arrowRotation()

double QgsLayoutNorthArrowHandler::arrowRotation ( ) const
inline

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

Definition at line 53 of file qgslayoutnortharrowhandler.h.

◆ arrowRotationChanged

void QgsLayoutNorthArrowHandler::arrowRotationChanged ( double newRotation)
signal

Emitted on arrow rotation change.

◆ linkedMap()

QgsLayoutItemMap * QgsLayoutNorthArrowHandler::linkedMap ( ) const

Returns the linked rotation map, if set.

An nullptr means arrow calculation is disabled.

See also
setLinkedMap()

Definition at line 110 of file qgslayoutnortharrowhandler.cpp.

◆ northMode()

NorthMode QgsLayoutNorthArrowHandler::northMode ( ) const
inline

Returns the mode used to calculate the arrow rotation.

See also
setNorthMode()
northOffset()

Definition at line 75 of file qgslayoutnortharrowhandler.h.

◆ northOffset()

double QgsLayoutNorthArrowHandler::northOffset ( ) const
inline

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

See also
setNorthOffset()
northMode()

Definition at line 89 of file qgslayoutnortharrowhandler.h.

◆ setLinkedMap()

void QgsLayoutNorthArrowHandler::setLinkedMap ( QgsLayoutItemMap * map)

Sets the linked map item.

See also
linkedMap()

Definition at line 84 of file qgslayoutnortharrowhandler.cpp.

◆ setNorthMode()

void QgsLayoutNorthArrowHandler::setNorthMode ( QgsLayoutNorthArrowHandler::NorthMode mode)

Sets the mode used to calculate the arrow rotation.

See also
northMode()
setNorthOffset()

Definition at line 115 of file qgslayoutnortharrowhandler.cpp.

◆ setNorthOffset()

void QgsLayoutNorthArrowHandler::setNorthOffset ( double offset)

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

See also
northOffset()
setNorthMode()

Definition at line 121 of file qgslayoutnortharrowhandler.cpp.


The documentation for this class was generated from the following files: