Quantum GIS API Documentation  1.8
Public Member Functions | Private Attributes
QgsLabelSearchTree Class Reference

A class to query the labeling structure at a given point (small wraper around pal RTree class) More...

#include <qgslabelsearchtree.h>

List of all members.

Public Member Functions

 QgsLabelSearchTree ()
 ~QgsLabelSearchTree ()
void clear ()
 Removes and deletes all the entries.
void label (const QgsPoint &p, QList< QgsLabelPosition * > &posList)
 Returns label position(s) at a given point.
bool insertLabel (LabelPosition *labelPos, int featureId, const QString &layerName, bool diagram=false)
 Inserts label position.

Private Attributes

RTree< QgsLabelPosition
*, double, 2, double > 
mSpatialIndex

Detailed Description

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.


Constructor & Destructor Documentation

Definition at line 25 of file qgslabelsearchtree.cpp.

Definition at line 29 of file qgslabelsearchtree.cpp.

References clear().


Member Function Documentation

Removes and deletes all the entries.

Definition at line 76 of file qgslabelsearchtree.cpp.

References mSpatialIndex.

Referenced by QgsPalLabeling::drawLabeling(), and ~QgsLabelSearchTree().

bool QgsLabelSearchTree::insertLabel ( LabelPosition *  labelPos,
int  featureId,
const QString &  layerName,
bool  diagram = false 
)

Inserts label position.

Does not take ownership of labelPos

Returns:
true in case of success

Definition at line 54 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().


Member Data Documentation

RTree<QgsLabelPosition*, double, 2, double> QgsLabelSearchTree::mSpatialIndex [private]

Definition at line 50 of file qgslabelsearchtree.h.

Referenced by clear(), insertLabel(), and label().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines