QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
Go to the documentation of this file.
31 Q_ASSERT( mLabelSink );
49 Q_UNUSED( withFeatureLoop )
55 Q_ASSERT( mLabelSink );
QString layerId() const
Returns ID of associated layer, or empty string if no layer is associated with the provider.
std::unique_ptr< QgsRuleBasedLabeling > mRules
owned copy
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.
QgsRuleBasedLabeling::RuleToProviderMap mSubProviders
label providers are owned by labeling engine
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.
QgsPalLayerSettings mSettings
Layer's labeling configuration.
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.