A class to query the labeling structure at a given point (small wrapper around pal RTree class)
More...
#include <qgslabelsearchtree.h>
|
| QgsLabelSearchTree () |
| Constructor for QgsLabelSearchTree. More...
|
|
| QgsLabelSearchTree (const QgsLabelSearchTree &rh)=delete |
| QgsLabelSearchTree cannot be copied. More...
|
|
| ~QgsLabelSearchTree () |
|
QList< QgsLabelPosition > | allLabels () const |
| Returns a list of all labels generated by the labeling run. More...
|
|
QList< const QgsCalloutPosition * > | calloutsInRectangle (const QgsRectangle &rectangle) const |
| Returns the list of callouts with origins or destinations inside the given rectangle. More...
|
|
Q_DECL_DEPRECATED void | clear () |
| Removes and deletes all the entries. More...
|
|
QList< QgsLabelPosition * > | groupedLabelPositions (long long groupId) const |
| Returns a list of all label positions sharing the same group ID (i.e. More...
|
|
bool | insertCallout (const QgsCalloutPosition &position) |
| Inserts a rendered callout position. More...
|
|
bool | insertLabel (pal::LabelPosition *labelPos, QgsFeatureId featureId, const QString &layerName, const QString &labeltext, const QFont &labelfont, bool diagram=false, bool pinned=false, const QString &providerId=QString(), bool isUnplaced=false, long long linkedId=0) |
| Inserts label position. More...
|
|
void | label (const QgsPointXY &p, QList< QgsLabelPosition * > &posList) const |
| Returns label position(s) at a given point. More...
|
|
void | labelsInRect (const QgsRectangle &r, QList< QgsLabelPosition * > &posList) const |
| Returns label position(s) in given rectangle. More...
|
|
QgsLabelSearchTree & | operator= (const QgsLabelSearchTree &rh)=delete |
| QgsLabelSearchTree cannot be copied. More...
|
|
void | setMapSettings (const QgsMapSettings &settings) |
| Sets the map settings associated with the labeling run. More...
|
|
A class to query the labeling structure at a given point (small wrapper around pal RTree class)
Definition at line 46 of file qgslabelsearchtree.h.
◆ QgsLabelSearchTree() [1/2]
QgsLabelSearchTree::QgsLabelSearchTree |
( |
| ) |
|
|
default |
◆ ~QgsLabelSearchTree()
QgsLabelSearchTree::~QgsLabelSearchTree |
( |
| ) |
|
|
default |
◆ QgsLabelSearchTree() [2/2]
◆ allLabels()
Returns a list of all labels generated by the labeling run.
- Since
- QGIS 3.20
Definition at line 45 of file qgslabelsearchtree.cpp.
◆ calloutsInRectangle()
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 143 of file qgslabelsearchtree.cpp.
◆ clear()
void QgsLabelSearchTree::clear |
( |
| ) |
|
◆ groupedLabelPositions()
QList< QgsLabelPosition * > QgsLabelSearchTree::groupedLabelPositions |
( |
long long |
groupId | ) |
const |
Returns a list of all label positions sharing the same group ID (i.e.
positions for individual characters in a curved label).
QgsLabelSearchTree keeps ownership, don't delete the LabelPositions
- Note
- not available in Python bindings
- Since
- QGIS 3.26
Definition at line 158 of file qgslabelsearchtree.cpp.
◆ insertCallout()
Inserts a rendered callout position.
- Returns
true
in case of success
- Note
- not available in Python bindings
- Since
- QGIS 3.20
Definition at line 128 of file qgslabelsearchtree.cpp.
◆ insertLabel()
bool QgsLabelSearchTree::insertLabel |
( |
pal::LabelPosition * |
labelPos, |
|
|
QgsFeatureId |
featureId, |
|
|
const QString & |
layerName, |
|
|
const QString & |
labeltext, |
|
|
const QFont & |
labelfont, |
|
|
bool |
diagram = false , |
|
|
bool |
pinned = false , |
|
|
const QString & |
providerId = QString() , |
|
|
bool |
isUnplaced = false , |
|
|
long long |
linkedId = 0 |
|
) |
| |
Inserts label position.
Does not take ownership of labelPos
- Returns
true
in case of success
- Note
- not available in Python bindings
Definition at line 76 of file qgslabelsearchtree.cpp.
◆ label()
◆ labelsInRect()
◆ operator=()
◆ setMapSettings()
void QgsLabelSearchTree::setMapSettings |
( |
const QgsMapSettings & |
settings | ) |
|
Sets the map settings associated with the labeling run.
- Since
- QGIS 3.4.8
Definition at line 163 of file qgslabelsearchtree.cpp.
The documentation for this class was generated from the following files: