QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
Public Member Functions | List of all members
QgsLabelSink Class Referenceabstract

Abstract base class that can be used to intercept rendered labels from a labeling / rendering job. More...

#include <qgslabelsink.h>

Inheritance diagram for QgsLabelSink:
Inheritance graph
[legend]

Public Member Functions

virtual ~QgsLabelSink ()=default
 
virtual void drawLabel (const QString &layerId, QgsRenderContext &context, pal::LabelPosition *label, const QgsPalLayerSettings &settings)=0
 The drawLabel method is called for each label that is being drawn. More...
 
virtual void drawUnplacedLabel (const QString &layerId, QgsRenderContext &context, pal::LabelPosition *label, const QgsPalLayerSettings &settings)
 The drawLabel method is called for each unplaced label. More...
 

Detailed Description

Abstract base class that can be used to intercept rendered labels from a labeling / rendering job.

Note
not available in Python bindings
Since
QGIS 3.14

Definition at line 37 of file qgslabelsink.h.

Constructor & Destructor Documentation

◆ ~QgsLabelSink()

virtual QgsLabelSink::~QgsLabelSink ( )
virtualdefault

Member Function Documentation

◆ drawLabel()

virtual void QgsLabelSink::drawLabel ( const QString &  layerId,
QgsRenderContext context,
pal::LabelPosition label,
const QgsPalLayerSettings settings 
)
pure virtual

The drawLabel method is called for each label that is being drawn.

Every subclass must implement this method to draw the label or send the information from label to another desired location.

Implemented in QgsDxfExport.

◆ drawUnplacedLabel()

virtual void QgsLabelSink::drawUnplacedLabel ( const QString &  layerId,
QgsRenderContext context,
pal::LabelPosition label,
const QgsPalLayerSettings settings 
)
inlinevirtual

The drawLabel method is called for each unplaced label.

Parameters
layerIdThe layer ID associated to the label
contextThe render context object
labelThe label object
settingsThe layer labeling settings
Since
QGIS 3.24

Definition at line 57 of file qgslabelsink.h.


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