QGIS API Documentation 3.41.0-Master (af5edcb665c)
Loading...
Searching...
No Matches
Public Types | Signals | Public Member Functions | List of all members
QgsLayoutNorthArrowHandler Class Reference

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

#include <qgslayoutnortharrowhandler.h>

Inheritance diagram for QgsLayoutNorthArrowHandler:
Inheritance graph
[legend]

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 32 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 38 of file qgslayoutnortharrowhandler.h.

Constructor & Destructor Documentation

◆ QgsLayoutNorthArrowHandler()

QgsLayoutNorthArrowHandler::QgsLayoutNorthArrowHandler ( QObject *  parent)

Constructor for QgsLayoutNorthArrowHandler, with the specified parent object.

Definition at line 25 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 52 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 108 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 74 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 88 of file qgslayoutnortharrowhandler.h.

◆ setLinkedMap()

void QgsLayoutNorthArrowHandler::setLinkedMap ( QgsLayoutItemMap map)

Sets the linked map item.

See also
linkedMap()

Definition at line 82 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 113 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 119 of file qgslayoutnortharrowhandler.cpp.


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