QgsLabelSearchTree class
A class to query the labeling structure at a given point (small wrapper around pal RTree class)
Contents
Constructors, destructors, conversion operators
- QgsLabelSearchTree() defaulted
- Constructor for QgsLabelSearchTree.
- QgsLabelSearchTree(const QgsLabelSearchTree& rh) deleted
- QgsLabelSearchTree cannot be copied.
Public functions
- void clear()
- Removes and deletes all the entries.
-
auto insertLabel(pal::
LabelPosition* labelPos, int featureId, const QString& layerName, const QString& labeltext, const QFont& labelfont, bool diagram = false, bool pinned = false, const QString& providerId = QString()) -> bool - 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.
- auto operator=(const QgsLabelSearchTree& rh) -> QgsLabelSearchTree& deleted
- QgsLabelSearchTree cannot be copied.
Function documentation
bool QgsLabelSearchTree:: insertLabel(pal:: LabelPosition* labelPos,
int featureId,
const QString& layerName,
const QString& labeltext,
const QFont& labelfont,
bool diagram = false,
bool pinned = false,
const QString& providerId = QString())
Inserts label position.
| Returns | true in case of success |
|---|
Does not take ownership of labelPos
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
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