|
QGIS API Documentation 3.99.0-Master (21b3aa880ba)
|
Queries the labeling structure at a given point. More...
#include <qgslabelsearchtree.h>
Public Member Functions | |
| QgsLabelSearchTree () | |
| QgsLabelSearchTree (const QgsLabelSearchTree &rh)=delete | |
| ~QgsLabelSearchTree () | |
| QList< QgsLabelPosition > | allLabels () 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. | |
| QList< QgsLabelPosition * > | groupedLabelPositions (long long groupId) const |
| Returns a list of all label positions sharing the same group ID (i.e. | |
| bool | insertCallout (const QgsCalloutPosition &position) |
| Inserts a rendered callout position. | |
| 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. | |
| 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. | |
| QgsLabelSearchTree & | operator= (const QgsLabelSearchTree &rh)=delete |
| void | setMapSettings (const QgsMapSettings &settings) |
| Sets the map settings associated with the labeling run. | |
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.
|
default |
|
default |
|
delete |
| QList< QgsLabelPosition > QgsLabelSearchTree::allLabels | ( | ) | const |
Returns a list of all labels generated by the labeling run.
Definition at line 46 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 144 of file qgslabelsearchtree.cpp.
| void QgsLabelSearchTree::clear | ( | ) |
Removes and deletes all the entries.
Definition at line 183 of file qgslabelsearchtree.cpp.
| 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
Definition at line 159 of file qgslabelsearchtree.cpp.
| bool QgsLabelSearchTree::insertCallout | ( | const QgsCalloutPosition & | position | ) |
Inserts a rendered callout position.
true in case of success Definition at line 129 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, | ||
| long long | linkedId = 0 ) |
Inserts label position.
Does not take ownership of labelPos
true in case of success Definition at line 77 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 23 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 57 of file qgslabelsearchtree.cpp.
|
delete |
| void QgsLabelSearchTree::setMapSettings | ( | const QgsMapSettings & | settings | ) |
Sets the map settings associated with the labeling run.
Definition at line 164 of file qgslabelsearchtree.cpp.