Class: QgsCalloutPosition¶
- class qgis.core.QgsCalloutPosition¶
Bases:
sip.wrapper
Represents the calculated placement of a map label callout line.
New in version 3.20.
QgsCalloutPosition(id: int, layer: str, providerId: str = ‘’) Constructor for QgsCalloutPosition.
- Parameters
id – associated feature ID
layer – ID of associated map layer
providerId – ID of associated label provider
QgsCalloutPosition() Constructor for QgsCalloutPosition
QgsCalloutPosition(
QgsCalloutPosition
)Methods
Returns the destination of the callout line, in map coordinates.
Returns
True
if the destination of the callout has pinned (manually placed).Returns the origin of the callout line, in map coordinates.
Returns
True
if the origin of the callout has pinned (manually placed).Sets the
destination
of the callout line, in map coordinates.Sets whether the destination of the callout has pinned (manually placed).
Sets the
origin
of the callout line, in map coordinates.Sets whether the origin of the callout has pinned (manually placed).
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
See also
- Return type
QPointF
- destinationIsPinned(self) bool ¶
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
See also
- Return type
bool
- 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
See also
- Return type
QPointF
- originIsPinned(self) bool ¶
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
See also
- Return type
bool
- 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
See also
- Parameters
destination (Union[QPointF) –
- setDestinationIsPinned(self, pinned: bool)¶
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
See also
- Parameters
pinned (bool) –
- 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
See also
- Parameters
origin (Union[QPointF) –
- setOriginIsPinned(self, pinned: bool)¶
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
See also
- Parameters
pinned (bool) –