|
Quantum GIS API Documentation
master-693a1fe
|
A class to query the labeling structure at a given point (small wraper around pal RTree class) More...
#include <qgslabelsearchtree.h>
Public Member Functions | |
| QgsLabelSearchTree () | |
| ~QgsLabelSearchTree () | |
| void | clear () |
| Removes and deletes all the entries. | |
| bool | insertLabel (LabelPosition *labelPos, int featureId, const QString &layerName, const QString &labeltext, bool diagram=false, bool pinned=false) |
| Inserts label position. | |
| void | label (const QgsPoint &p, QList< QgsLabelPosition * > &posList) |
| Returns label position(s) at a given point. | |
| void | labelsInRect (const QgsRectangle &r, QList< QgsLabelPosition * > &posList) |
| Returns label position(s) in given rectangle. | |
Private Attributes | |
| RTree< QgsLabelPosition *, double, 2, double > | mSpatialIndex |
A class to query the labeling structure at a given point (small wraper around pal RTree class)
Definition at line 33 of file qgslabelsearchtree.h.
Definition at line 25 of file qgslabelsearchtree.cpp.
Definition at line 29 of file qgslabelsearchtree.cpp.
References clear().
| void QgsLabelSearchTree::clear | ( | ) |
Removes and deletes all the entries.
Definition at line 92 of file qgslabelsearchtree.cpp.
References mSpatialIndex.
Referenced by QgsPalLabeling::drawLabeling(), and ~QgsLabelSearchTree().
| bool QgsLabelSearchTree::insertLabel | ( | LabelPosition * | labelPos, |
| int | featureId, | ||
| const QString & | layerName, | ||
| const QString & | labeltext, | ||
| bool | diagram = false, |
||
| bool | pinned = false |
||
| ) |
Inserts label position.
Does not take ownership of labelPos
Definition at line 70 of file qgslabelsearchtree.cpp.
References mSpatialIndex.
Referenced by QgsPalLabeling::drawLabeling().
| void QgsLabelSearchTree::label | ( | const QgsPoint & | p, |
| QList< QgsLabelPosition * > & | posList | ||
| ) |
Returns label position(s) at a given point.
QgsLabelSearchTree keeps ownership, don't delete the LabelPositions
Definition at line 34 of file qgslabelsearchtree.cpp.
References mSpatialIndex, searchCallback(), QgsPoint::x(), and QgsPoint::y().
Referenced by QgsPalLabeling::labelsAtPosition().
| void QgsLabelSearchTree::labelsInRect | ( | const QgsRectangle & | r, |
| QList< QgsLabelPosition * > & | posList | ||
| ) |
Returns label position(s) in given rectangle.
QgsLabelSearchTree keeps ownership, don't delete the LabelPositions
Definition at line 54 of file qgslabelsearchtree.cpp.
References mSpatialIndex, searchCallback(), QgsRectangle::xMaximum(), QgsRectangle::xMinimum(), QgsRectangle::yMaximum(), and QgsRectangle::yMinimum().
Referenced by QgsPalLabeling::labelsWithinRect().
RTree<QgsLabelPosition*, double, 2, double> QgsLabelSearchTree::mSpatialIndex [private] |
Definition at line 61 of file qgslabelsearchtree.h.
Referenced by clear(), insertLabel(), label(), and labelsInRect().