16#ifndef QGSLABELINGRESULTS_H
17#define QGSLABELINGRESULTS_H
76 const QString &layerName,
77 const QString &labeltext,
78 const QFont &labelfont,
81 const QString &providerId = QString(),
82 bool isUnplaced =
false,
83 long long linkedId = 0,
84 long long linkedPositionIndex = 0,
85 long long subPartId = 0
103 QList< QgsLabelPosition >
allLabels()
const;
150 std::unique_ptr< QgsLabelSearchTree > mLabelSearchTree;
152 QList< QgsLabelPosition > mAllLabels;
155 QTransform mTransform;
156 long long mNextFeatureId = 1;
157 QHash< long long, QList< QgsLabelPosition * > > mLinkedLabelHash;
159 std::vector< std::unique_ptr< QgsLabelPosition > > mOwnedPositions;
160 std::vector< std::unique_ptr< QgsCalloutPosition > > mOwnedCalloutPositions;
Represents the calculated placement of a map label callout line.
Queries the labeling structure at a given point.
QgsLabelingResults(const QgsLabelingResults &)=delete
bool insertCallout(const QgsCalloutPosition &position)
Inserts a rendered callout position.
bool hasSearchTree() const
Returns true if the results were constructed with search tree enabled.
QList< QgsCalloutPosition > calloutsWithinRectangle(const QgsRectangle &rectangle) const
Returns a list of callouts with origins or destinations inside the given rectangle.
QgsLabelingResults(bool enableSearchTree=true)
Constructor for QgsLabelingResults.
bool insertLabel(pal::LabelPosition *labelPos, QgsFeatureId featureId, const QString &layerName, const QString &labeltext, const QFont &labelfont, bool diagram=false, bool pinned=false, const QString &providerId=QString(), bool isUnplaced=false, long long linkedId=0, long long linkedPositionIndex=0, long long subPartId=0)
Inserts label position.
QgsLabelingResults & operator=(const QgsLabelingResults &rh)=delete
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.
LabelPosition is a candidate feature label position.
qint64 QgsFeatureId
64 bit feature ids negative numbers are used for uncommitted/newly added features