Class: QgsLabelSearchTree¶
Queries the labeling structure at a given point.
This class is a small wrapper around the pal RTree class.
- class qgis.core.QgsLabelSearchTree[source]¶
Bases:
object- allLabels(self) List[QgsLabelPosition]¶
Returns a list of all labels generated by the labeling run.
Added in version 3.20.
- Return type:
- calloutsInRectangle(self, rectangle: QgsRectangle) List[QgsCalloutPosition]¶
Returns the list of callouts with origins or destinations inside the given
rectangle.The
rectangleis specified in map coordinates.QgsLabelSearchTreekeeps ownership, don’t delete the returned objects.Added in version 3.20.
- Parameters:
rectangle (QgsRectangle)
- Return type:
- clear(self)[source]¶
Removes and deletes all the entries.
Deprecated since version 3.40: Has no effect since QGIS 3.12.
- setMapSettings(self, settings: QgsMapSettings)[source]¶
Sets the map
settingsassociated with the labeling run.Added in version 3.4.8.
- Parameters:
settings (QgsMapSettings)