29 return mLabelSearchTree ? mLabelSearchTree->allLabels() : QList<QgsLabelPosition>();
34 QList<QgsLabelPosition> positions;
36 QList<QgsLabelPosition *> positionPointers;
37 if ( mLabelSearchTree )
39 mLabelSearchTree->label( p, positionPointers );
40 QList<QgsLabelPosition *>::const_iterator pointerIt = positionPointers.constBegin();
41 for ( ; pointerIt != positionPointers.constEnd(); ++pointerIt )
52 QList<QgsLabelPosition> positions;
54 QList<QgsLabelPosition *> positionPointers;
55 if ( mLabelSearchTree )
57 mLabelSearchTree->labelsInRect( r, positionPointers );
58 QList<QgsLabelPosition *>::const_iterator pointerIt = positionPointers.constBegin();
59 for ( ; pointerIt != positionPointers.constEnd(); ++pointerIt )
70 QList<QgsLabelPosition> positions;
71 if ( mLabelSearchTree )
73 const QList<QgsLabelPosition *> positionPointers = mLabelSearchTree->groupedLabelPositions( groupId );
74 positions.reserve( positionPointers.size() );
83 QList<QgsCalloutPosition> positions;
85 if ( mLabelSearchTree )
87 const QList<const QgsCalloutPosition *>positionPointers = mLabelSearchTree->calloutsInRectangle( rectangle );
99 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.