QGIS API Documentation 4.3.0-Master (f865f0c58a6)
Loading...
Searching...
No Matches
QgsLabelSearchTree Class Reference

Queries the labeling structure at a given point. More...

#include <qgslabelsearchtree.h>

Public Member Functions

 QgsLabelSearchTree ()
 QgsLabelSearchTree (const QgsLabelSearchTree &rh)=delete
 ~QgsLabelSearchTree ()
Q_DECL_DEPRECATED QList< QgsLabelPositionallLabels () const
 Returns a list of all labels generated by the labeling run.
QList< const QgsCalloutPosition * > calloutsInRectangle (const QgsRectangle &rectangle) const
 Returns the list of callouts with origins or destinations inside the given rectangle.
Q_DECL_DEPRECATED void clear ()
 Removes and deletes all the entries.
void label (const QgsPointXY &p, QList< QgsLabelPosition * > &posList) const
 Returns label position(s) at a given point.
void labelsInRect (const QgsRectangle &r, QList< QgsLabelPosition * > &posList) const
 Returns label position(s) in given rectangle.
QgsLabelSearchTreeoperator= (const QgsLabelSearchTree &rh)=delete
Q_DECL_DEPRECATED void setMapSettings (const QgsMapSettings &settings)
 Sets the map settings associated with the labeling run.

Friends

class QgsLabelingResults

Detailed Description

Queries the labeling structure at a given point.

This class is a small wrapper around the pal RTree class.

Definition at line 49 of file qgslabelsearchtree.h.

Constructor & Destructor Documentation

◆ QgsLabelSearchTree() [1/2]

QgsLabelSearchTree::QgsLabelSearchTree ( )
default

◆ ~QgsLabelSearchTree()

QgsLabelSearchTree::~QgsLabelSearchTree ( )
default

◆ QgsLabelSearchTree() [2/2]

QgsLabelSearchTree::QgsLabelSearchTree ( const QgsLabelSearchTree & rh)
delete

Member Function Documentation

◆ allLabels()

QList< QgsLabelPosition > QgsLabelSearchTree::allLabels ( ) const

Returns a list of all labels generated by the labeling run.

Deprecated
QGIS 4.4. The QgsLabelSearchTree class will be removed from Python bindings in QGIS 5.0, use the methods from QgsLabelingResults instead.

Definition at line 43 of file qgslabelsearchtree.cpp.

◆ calloutsInRectangle()

QList< const QgsCalloutPosition * > QgsLabelSearchTree::calloutsInRectangle ( const QgsRectangle & rectangle) const

Returns the list of callouts with origins or destinations inside the given rectangle.

The rectangle is specified in map coordinates.

QgsLabelSearchTree keeps ownership, don't delete the returned objects.

Since
QGIS 3.20

Definition at line 67 of file qgslabelsearchtree.cpp.

◆ clear()

void QgsLabelSearchTree::clear ( )

Removes and deletes all the entries.

Deprecated
QGIS 3.40. Has no effect since QGIS 3.12.

Definition at line 84 of file qgslabelsearchtree.cpp.

◆ label()

void QgsLabelSearchTree::label ( const QgsPointXY & p,
QList< QgsLabelPosition * > & posList ) const

Returns label position(s) at a given point.

QgsLabelSearchTree keeps ownership, don't delete the LabelPositions

Note
not available in Python bindings

Definition at line 21 of file qgslabelsearchtree.cpp.

◆ labelsInRect()

void QgsLabelSearchTree::labelsInRect ( const QgsRectangle & r,
QList< QgsLabelPosition * > & posList ) const

Returns label position(s) in given rectangle.

QgsLabelSearchTree keeps ownership, don't delete the LabelPositions

Note
not available in Python bindings

Definition at line 48 of file qgslabelsearchtree.cpp.

◆ operator=()

QgsLabelSearchTree & QgsLabelSearchTree::operator= ( const QgsLabelSearchTree & rh)
delete

◆ setMapSettings()

void QgsLabelSearchTree::setMapSettings ( const QgsMapSettings & settings)

Sets the map settings associated with the labeling run.

Deprecated
QGIS 4.4. The QgsLabelSearchTree class will be removed from Python bindings in QGIS 5.0, use the methods from QgsLabelingResults instead.

Definition at line 81 of file qgslabelsearchtree.cpp.

◆ QgsLabelingResults

friend class QgsLabelingResults
friend

Definition at line 109 of file qgslabelsearchtree.h.


The documentation for this class was generated from the following files: