31 return mLabelSearchTree ? mLabelSearchTree->allLabels() : QList<QgsLabelPosition>();
36 QList<QgsLabelPosition> positions;
38 QList<QgsLabelPosition *> positionPointers;
39 if ( mLabelSearchTree )
41 mLabelSearchTree->label( p, positionPointers );
42 QList<QgsLabelPosition *>::const_iterator pointerIt = positionPointers.constBegin();
43 for ( ; pointerIt != positionPointers.constEnd(); ++pointerIt )
54 QList<QgsLabelPosition> positions;
56 QList<QgsLabelPosition *> positionPointers;
57 if ( mLabelSearchTree )
59 mLabelSearchTree->labelsInRect( r, positionPointers );
60 QList<QgsLabelPosition *>::const_iterator pointerIt = positionPointers.constBegin();
61 for ( ; pointerIt != positionPointers.constEnd(); ++pointerIt )
72 QList<QgsLabelPosition> positions;
73 if ( mLabelSearchTree )
75 const QList<QgsLabelPosition *> positionPointers = mLabelSearchTree->groupedLabelPositions( groupId );
76 positions.reserve( positionPointers.size() );
85 QList<QgsCalloutPosition> positions;
87 if ( mLabelSearchTree )
89 const QList<const QgsCalloutPosition *>positionPointers = mLabelSearchTree->calloutsInRectangle( rectangle );
101 mLabelSearchTree->setMapSettings( settings );
Represents the calculated placement of a map label callout line.
Represents the calculated placement of a map label.
A class to query the labeling structure at a given point (small wrapper around pal RTree class)
QList< QgsCalloutPosition > calloutsWithinRectangle(const QgsRectangle &rectangle) const
Returns a list of callouts with origins or destinations inside the given rectangle.
void setMapSettings(const QgsMapSettings &settings)
Sets the map settings associated with the labeling run.
QList< QgsLabelPosition > allLabels() const
Returns a list of all labels generated by the labeling run.
QList< QgsLabelPosition > labelsAtPosition(const QgsPointXY &p) const
Returns the details of any labels placed at the specified point (in map coordinates).
QList< QgsLabelPosition > groupedLabelPositions(long long groupId) const
Returns a list of all label positions sharing the same group ID (i.e.
QList< QgsLabelPosition > labelsWithinRect(const QgsRectangle &r) const
Returns the details of any labels placed within the specified rectangle (in map coordinates).
The QgsMapSettings class contains configuration for rendering of the map.
A class to represent a 2D point.
A rectangle specified with double values.