Class: QgsLabelSearchTree¶
A class to query the labeling structure at a given point (small wrapper around pal RTree class)
Methods
Returns a list of all labels generated by the labeling run.  | 
|
Returns the list of callouts with origins or destinations inside the given rectangle.  | 
|
Removes and deletes all the entries.  | 
|
Sets the map settings associated with the labeling run.  | 
- 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:
 List[QgsLabelPosition]
- 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:
 List[QgsCalloutPosition]
- 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)