QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
Go to the documentation of this file.
18 #ifndef QGSLABELSINK_H
19 #define QGSLABELSINK_H
99 #endif // QGSLABELSINK_H
LabelPosition is a candidate feature label position.
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....
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.
QgsMapLayer * layer() const
Returns the associated layer, or nullptr if no layer is associated with the provider.
QgsVectorLayerLabelProvider * createProvider(QgsVectorLayer *layer, const QString &providerId, bool withFeatureLoop, const QgsPalLayerSettings *settings) override
Creates a QgsRuleBasedLabelSinkProvider.