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

Represents the calculated placement of a map label callout line. More...

#include <qgscalloutposition.h>

Public Member Functions

 QgsCalloutPosition ()=default
 
 QgsCalloutPosition (QgsFeatureId id, const QString &layer, const QString &providerId=QString())
 Constructor for QgsCalloutPosition.
 
QPointF destination () const
 Returns the destination of the callout line, in map coordinates.
 
bool destinationIsPinned () const
 Returns true if the destination of the callout has pinned (manually placed).
 
QPointF origin () const
 Returns the origin of the callout line, in map coordinates.
 
bool originIsPinned () const
 Returns true if the origin of the callout has pinned (manually placed).
 
void setDestination (const QPointF &destination)
 Sets the destination of the callout line, in map coordinates.
 
void setDestinationIsPinned (bool pinned)
 Sets whether the destination of the callout has pinned (manually placed).
 
void setOrigin (const QPointF &origin)
 Sets the origin of the callout line, in map coordinates.
 
void setOriginIsPinned (bool pinned)
 Sets whether the origin of the callout has pinned (manually placed).
 

Public Attributes

QgsFeatureId featureId = FID_NULL
 ID of feature associated with this callout.
 
QString layerID
 ID of associated map layer.
 
QString providerID
 ID of the associated label provider.
 

Detailed Description

Represents the calculated placement of a map label callout line.

Since
QGIS 3.20

Definition at line 32 of file qgscalloutposition.h.

Constructor & Destructor Documentation

◆ QgsCalloutPosition() [1/2]

QgsCalloutPosition::QgsCalloutPosition ( QgsFeatureId  id,
const QString &  layer,
const QString &  providerId = QString() 
)
inline

Constructor for QgsCalloutPosition.

Parameters
idassociated feature ID
layerID of associated map layer
providerIdID of associated label provider

Definition at line 42 of file qgscalloutposition.h.

◆ QgsCalloutPosition() [2/2]

QgsCalloutPosition::QgsCalloutPosition ( )
default

Member Function Documentation

◆ destination()

QPointF QgsCalloutPosition::destination ( ) const
inline

Returns the destination of the callout line, in map coordinates.

The destination of the callout line is the line point associated with the feature's geometry.

See also
setDestination()
origin()

Definition at line 93 of file qgscalloutposition.h.

◆ destinationIsPinned()

bool QgsCalloutPosition::destinationIsPinned ( ) const
inline

Returns true if the destination of the callout has pinned (manually placed).

The destination of the callout line is the line point associated with the feature's geometry.

See also
originIsPinned()
setDestinationIsPinned()

Definition at line 133 of file qgscalloutposition.h.

◆ origin()

QPointF QgsCalloutPosition::origin ( ) const
inline

Returns the origin of the callout line, in map coordinates.

The origin of the callout line is the line point associated with the label text.

See also
setOrigin()
destination()

Definition at line 73 of file qgscalloutposition.h.

◆ originIsPinned()

bool QgsCalloutPosition::originIsPinned ( ) const
inline

Returns true if the origin of the callout has pinned (manually placed).

The origin of the callout line is the line point associated with the label text.

See also
destinationIsPinned()
setOriginIsPinned()

Definition at line 113 of file qgscalloutposition.h.

◆ setDestination()

void QgsCalloutPosition::setDestination ( const QPointF &  destination)
inline

Sets the destination of the callout line, in map coordinates.

The destination of the callout line is the line point associated with the feature's geometry.

See also
destination()
setOrigin()

Definition at line 103 of file qgscalloutposition.h.

◆ setDestinationIsPinned()

void QgsCalloutPosition::setDestinationIsPinned ( bool  pinned)
inline

Sets whether the destination of the callout has pinned (manually placed).

The destination of the callout line is the line point associated with the feature's geometry.

See also
setOriginIsPinned()
destinationIsPinned()

Definition at line 143 of file qgscalloutposition.h.

◆ setOrigin()

void QgsCalloutPosition::setOrigin ( const QPointF &  origin)
inline

Sets the origin of the callout line, in map coordinates.

The origin of the callout line is the line point associated with the label text.

See also
origin()
setDestination()

Definition at line 83 of file qgscalloutposition.h.

◆ setOriginIsPinned()

void QgsCalloutPosition::setOriginIsPinned ( bool  pinned)
inline

Sets whether the origin of the callout has pinned (manually placed).

The origin of the callout line is the line point associated with the label text.

See also
setDestinationIsPinned()
originIsPinned()

Definition at line 123 of file qgscalloutposition.h.

Member Data Documentation

◆ featureId

QgsFeatureId QgsCalloutPosition::featureId = FID_NULL

ID of feature associated with this callout.

Definition at line 53 of file qgscalloutposition.h.

◆ layerID

QString QgsCalloutPosition::layerID

ID of associated map layer.

Definition at line 58 of file qgscalloutposition.h.

◆ providerID

QString QgsCalloutPosition::providerID

ID of the associated label provider.

Definition at line 63 of file qgscalloutposition.h.


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