QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
Public Member Functions | Friends | List of all members
QgsLabelingResults Class Reference

Class that stores computed placement from labeling engine. More...

#include <qgslabelingresults.h>

Public Member Functions

 QgsLabelingResults ()
 
 QgsLabelingResults (const QgsLabelingResults &)=delete
 QgsLabelingResults cannot be copied. More...
 
 ~QgsLabelingResults ()
 
QList< QgsLabelPositionallLabels () const
 Returns a list of all labels generated by the labeling run. More...
 
QList< QgsCalloutPositioncalloutsWithinRectangle (const QgsRectangle &rectangle) const
 Returns a list of callouts with origins or destinations inside the given rectangle. More...
 
QList< QgsLabelPositiongroupedLabelPositions (long long groupId) const
 Returns a list of all label positions sharing the same group ID (i.e. More...
 
QList< QgsLabelPositionlabelsAtPosition (const QgsPointXY &p) const
 Returns the details of any labels placed at the specified point (in map coordinates). More...
 
QList< QgsLabelPositionlabelsWithinRect (const QgsRectangle &r) const
 Returns the details of any labels placed within the specified rectangle (in map coordinates). More...
 
QgsLabelingResultsoperator= (const QgsLabelingResults &rh)=delete
 QgsLabelingResults cannot be copied. More...
 
void setMapSettings (const QgsMapSettings &settings)
 Sets the map settings associated with the labeling run. More...
 

Friends

class QgsPalLabeling
 
class QgsVectorLayerDiagramProvider
 
class QgsVectorLayerLabelProvider
 

Detailed Description

Class that stores computed placement from labeling engine.

Since
QGIS 2.4

Definition at line 32 of file qgslabelingresults.h.

Constructor & Destructor Documentation

◆ QgsLabelingResults() [1/2]

QgsLabelingResults::QgsLabelingResults ( )

Definition at line 19 of file qgslabelingresults.cpp.

◆ ~QgsLabelingResults()

QgsLabelingResults::~QgsLabelingResults ( )
default

◆ QgsLabelingResults() [2/2]

QgsLabelingResults::QgsLabelingResults ( const QgsLabelingResults )
delete

QgsLabelingResults cannot be copied.

Member Function Documentation

◆ allLabels()

QList< QgsLabelPosition > QgsLabelingResults::allLabels ( ) const

Returns a list of all labels generated by the labeling run.

Since
QGIS 3.20

Definition at line 27 of file qgslabelingresults.cpp.

◆ calloutsWithinRectangle()

QList< QgsCalloutPosition > QgsLabelingResults::calloutsWithinRectangle ( const QgsRectangle rectangle) const

Returns a list of callouts with origins or destinations inside the given rectangle.

The rectangle is specified in map coordinates.

Since
QGIS 3.20

Definition at line 81 of file qgslabelingresults.cpp.

◆ groupedLabelPositions()

QList< QgsLabelPosition > QgsLabelingResults::groupedLabelPositions ( long long  groupId) const

Returns a list of all label positions sharing the same group ID (i.e.

positions for individual characters in a curved label).

Since
QGIS 3.26

Definition at line 68 of file qgslabelingresults.cpp.

◆ labelsAtPosition()

QList< QgsLabelPosition > QgsLabelingResults::labelsAtPosition ( const QgsPointXY p) const

Returns the details of any labels placed at the specified point (in map coordinates).

Definition at line 32 of file qgslabelingresults.cpp.

◆ labelsWithinRect()

QList< QgsLabelPosition > QgsLabelingResults::labelsWithinRect ( const QgsRectangle r) const

Returns the details of any labels placed within the specified rectangle (in map coordinates).

Definition at line 50 of file qgslabelingresults.cpp.

◆ operator=()

QgsLabelingResults & QgsLabelingResults::operator= ( const QgsLabelingResults rh)
delete

QgsLabelingResults cannot be copied.

◆ setMapSettings()

void QgsLabelingResults::setMapSettings ( const QgsMapSettings settings)

Sets the map settings associated with the labeling run.

Since
QGIS 3.4.8

Definition at line 97 of file qgslabelingresults.cpp.

Friends And Related Function Documentation

◆ QgsPalLabeling

friend class QgsPalLabeling
friend

Definition at line 89 of file qgslabelingresults.h.

◆ QgsVectorLayerDiagramProvider

friend class QgsVectorLayerDiagramProvider
friend

Definition at line 91 of file qgslabelingresults.h.

◆ QgsVectorLayerLabelProvider

friend class QgsVectorLayerLabelProvider
friend

Definition at line 90 of file qgslabelingresults.h.


The documentation for this class was generated from the following files: