QGIS API Documentation
3.24.2-Tisler (13c1a02865)
|
A class to query the labeling structure at a given point (small wrapper around pal RTree class) More...
#include <qgslabelsearchtree.h>
Public Member Functions | |
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... | |
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) |
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.
|
default |
Constructor for QgsLabelSearchTree.
|
default |
|
delete |
QgsLabelSearchTree cannot be copied.
QList< QgsLabelPosition > QgsLabelSearchTree::allLabels | ( | ) | const |
Returns a list of all labels generated by the labeling run.
Definition at line 45 of file qgslabelsearchtree.cpp.
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.
Definition at line 129 of file qgslabelsearchtree.cpp.
void QgsLabelSearchTree::clear | ( | ) |
Removes and deletes all the entries.
Definition at line 163 of file qgslabelsearchtree.cpp.
bool QgsLabelSearchTree::insertCallout | ( | const QgsCalloutPosition & | position | ) |
Inserts a rendered callout position.
true
in case of success Definition at line 114 of file qgslabelsearchtree.cpp.
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 |
||
) |
Inserts label position.
Does not take ownership of labelPos
true
in case of success Definition at line 76 of file qgslabelsearchtree.cpp.
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
Definition at line 22 of file qgslabelsearchtree.cpp.
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
Definition at line 56 of file qgslabelsearchtree.cpp.
|
delete |
QgsLabelSearchTree cannot be copied.
void QgsLabelSearchTree::setMapSettings | ( | const QgsMapSettings & | settings | ) |
Sets the map settings associated with the labeling run.
Definition at line 144 of file qgslabelsearchtree.cpp.