QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
18 #ifndef QGSLABELSINK_H
19 #define QGSLABELSINK_H
118 #endif // QGSLABELSINK_H
Contains settings for how a map layer will be labeled.
Implements a derived label provider for rule based labels for use with QgsLabelSink.
LabelPosition is a candidate feature label position.
Abstract base class that can be used to intercept rendered labels from a labeling / rendering job.
Contains information about the context of a rendering operation.
QgsRuleBasedLabelSinkProvider(const QgsRuleBasedLabeling &rules, QgsVectorLayer *layer, QgsLabelSink *sink)
Creates a rule based label sink provider which will draw/register labels in sink.
The QgsVectorLayerLabelProvider class implements a label provider for vector layers....
Rule based labeling for a vector layer.
const QgsPalLayerSettings & settings() const
Returns the layer's settings.
virtual ~QgsLabelSink()=default
void drawLabel(QgsRenderContext &context, pal::LabelPosition *label) const override
Draw this label at the position determined by the labeling engine.
QgsLabelSinkProvider(QgsVectorLayer *layer, const QString &providerId, QgsLabelSink *sink, const QgsPalLayerSettings *settings)
Creates a rule based label sink provider which will draw/register labels in sink.
Q_DECL_DEPRECATED void reinit(QgsVectorLayer *layer)
Reinitialize the subproviders with QgsLabelSinkProviders.
QString providerId() const
Returns provider ID - useful in case there is more than one label provider within a layer (e....
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.
void drawLabel(QgsRenderContext &context, pal::LabelPosition *label) const override
Draw this label at the position determined by the labeling engine.
void drawUnplacedLabel(QgsRenderContext &context, pal::LabelPosition *label) const override
Draw an unplaced label.
Represents a vector layer which manages a vector based data sets.
Implements a derived label provider for use with QgsLabelSink.
QgsMapLayer * layer() const
Returns the associated layer, or nullptr if no layer is associated with the provider.
void drawUnplacedLabel(QgsRenderContext &context, pal::LabelPosition *label) const override
Draw an unplaced label.
QgsVectorLayerLabelProvider * createProvider(QgsVectorLayer *layer, const QString &providerId, bool withFeatureLoop, const QgsPalLayerSettings *settings) override
Creates a QgsRuleBasedLabelSinkProvider.
Label provider for rule based labeling.
virtual void drawUnplacedLabel(const QString &layerId, QgsRenderContext &context, pal::LabelPosition *label, const QgsPalLayerSettings &settings)
The drawLabel method is called for each unplaced label.