Class: QgsCalloutPosition¶
Represents the calculated placement of a map label callout line.
Added in version 3.20.
Methods
Returns the destination of the callout line, in map coordinates. |
|
Returns |
|
Returns the origin of the callout line, in map coordinates. |
|
Returns |
|
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
ID of feature associated with this callout. |
|
ID of associated map layer. |
|
ID of the associated label provider. |
- class qgis.core.QgsCalloutPosition[source]¶
Bases:
object
- __init__(id: int, layer: str | None, providerId: str | None = '')
Constructor for QgsCalloutPosition.
- Parameters:
id (int) – associated feature ID
layer (Optional[str]) – ID of associated map layer
providerId (Optional[str] = '') – ID of associated label provider
- __init__()
- __init__(a0: QgsCalloutPosition)
- Parameters:
a0 (QgsCalloutPosition)
- destination(self) QPointF [source]¶
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 [source]¶
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: QgsFeatureId¶
ID of feature associated with this callout.
- layerID: str¶
ID of associated map layer.
- origin(self) QPointF [source]¶
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 [source]¶
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: str¶
ID of the associated label provider.
- setDestination(self, destination: QPointF | QPoint)[source]¶
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, QPoint])
- setDestinationIsPinned(self, pinned: bool)[source]¶
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: QPointF | QPoint)[source]¶
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, QPoint])