30 return mLabelSearchTree ? mLabelSearchTree->allLabels() : QList<QgsLabelPosition>();
35 QList<QgsLabelPosition> positions;
37 QList<QgsLabelPosition *> positionPointers;
38 if ( mLabelSearchTree )
40 mLabelSearchTree->label( p, positionPointers );
41 QList<QgsLabelPosition *>::const_iterator pointerIt = positionPointers.constBegin();
42 for ( ; pointerIt != positionPointers.constEnd(); ++pointerIt )
53 QList<QgsLabelPosition> positions;
55 QList<QgsLabelPosition *> positionPointers;
56 if ( mLabelSearchTree )
58 mLabelSearchTree->labelsInRect( r, positionPointers );
59 QList<QgsLabelPosition *>::const_iterator pointerIt = positionPointers.constBegin();
60 for ( ; pointerIt != positionPointers.constEnd(); ++pointerIt )
71 QList<QgsLabelPosition> positions;
72 if ( mLabelSearchTree )
74 const QList<QgsLabelPosition *> positionPointers = mLabelSearchTree->groupedLabelPositions( groupId );
75 positions.reserve( positionPointers.size() );
84 QList<QgsCalloutPosition> positions;
86 if ( mLabelSearchTree )
88 const QList<const QgsCalloutPosition *> positionPointers = mLabelSearchTree->calloutsInRectangle( rectangle );
100 mLabelSearchTree->setMapSettings( settings );
Represents the calculated placement of a map label callout line.
Represents the calculated placement of a map label.
Queries the labeling structure at a given point.
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).
Contains configuration for rendering maps.
A rectangle specified with double values.