QGIS API Documentation 3.41.0-Master (fda2aa46e9a)
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
QgsCallout::QgsCalloutContext Class Reference

Contains additional contextual information about the context in which a callout is being rendered. More...

#include <qgscallout.h>

Public Member Functions

void addCalloutPosition (const QgsCalloutPosition &position)
 Adds a rendered callout position.
 
QgsCoordinateTransform originalFeatureToMapTransform (const QgsRenderContext &renderContext) const
 Returns the coordinate transform to convert from the original layer associated with the callout to the destination map CRS.
 
QList< QgsCalloutPositionpositions () const
 Returns the list of rendered callout positions.
 

Public Attributes

bool allFeaturePartsLabeled = false
 true if all parts of associated feature were labeled
 
QgsCoordinateReferenceSystem originalFeatureCrs
 Contains the CRS of the original feature associated with this callout.
 

Detailed Description

Contains additional contextual information about the context in which a callout is being rendered.

Since
QGIS 3.10

Definition at line 248 of file qgscallout.h.

Member Function Documentation

◆ addCalloutPosition()

void QgsCallout::QgsCalloutContext::addCalloutPosition ( const QgsCalloutPosition position)
inline

Adds a rendered callout position.

The position details such as the callout line origin and destination should be populated by the callout subclass during rendering operations.

Note
the feature ID, layer ID and provider ID of the QgsCalloutPosition will be automatically populated.
Since
QGIS 3.20

Definition at line 279 of file qgscallout.h.

◆ originalFeatureToMapTransform()

QgsCoordinateTransform QgsCallout::QgsCalloutContext::originalFeatureToMapTransform ( const QgsRenderContext renderContext) const

Returns the coordinate transform to convert from the original layer associated with the callout to the destination map CRS.

Since
QGIS 3.20

Definition at line 516 of file qgscallout.cpp.

◆ positions()

QList< QgsCalloutPosition > QgsCallout::QgsCalloutContext::positions ( ) const
inline

Returns the list of rendered callout positions.

Since
QGIS 3.20

Definition at line 286 of file qgscallout.h.

Member Data Documentation

◆ allFeaturePartsLabeled

bool QgsCallout::QgsCalloutContext::allFeaturePartsLabeled = false

true if all parts of associated feature were labeled

Definition at line 252 of file qgscallout.h.

◆ originalFeatureCrs

QgsCoordinateReferenceSystem QgsCallout::QgsCalloutContext::originalFeatureCrs

Contains the CRS of the original feature associated with this callout.

Since
QGIS 3.20

Definition at line 259 of file qgscallout.h.


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