Class: QgsCalloutPosition

class qgis.core.QgsCalloutPosition(id: int, layer: str, providerId: str = '')

Bases: sip.wrapper

Constructor for QgsCalloutPosition.

Parameters
  • id (int) – associated feature ID

  • layer (str) – ID of associated map layer

  • providerId (str = '') – ID of associated label provider

QgsCalloutPosition() Constructor for QgsCalloutPosition

QgsCalloutPosition(QgsCalloutPosition)

Represents the calculated placement of a map label callout line.

Methods

destination

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

origin

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

setDestination

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

setOrigin

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

Attributes

destination(self) → QPointF

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

See also

origin()

Return type

QPointF

featureId
layerID
origin(self) → QPointF

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

See also

destination()

Return type

QPointF

providerID
setDestination(self, destination: Union[QPointF, QPoint])

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

See also

setOrigin()

Parameters

destination (Union[QPointF) –

setOrigin(self, origin: Union[QPointF, QPoint])

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

See also

setDestination()

Parameters

origin (Union[QPointF) –