28 if ( element.
attribute(
"type" ) ==
"rule-based" )
bool labelsEnabled() const
Returns whether the layer contains labels which are enabled and should be drawn.
virtual QString type() const override
Unique type string of the labeling configuration implementation.
virtual QgsVectorLayerLabelProvider * provider(QgsVectorLayer *layer) const override
Factory for label provider implementation.
QString attribute(const QString &name, const QString &defValue) const
static QgsPalLayerSettings fromLayer(QgsVectorLayer *layer)
The QgsVectorLayerLabelProvider class implements a label provider for vector layers.
virtual ~QgsAbstractVectorLayerLabeling()
void setAttribute(const QString &name, const QString &value)
virtual QDomElement save(QDomDocument &doc) const override
Return labeling configuration as XML element.
static QgsRuleBasedLabeling * create(const QDomElement &element)
Create the instance from a DOM element with saved configuration.
virtual QgsPalLayerSettings settings(QgsVectorLayer *layer, const QString &providerId=QString()) const override
Get associated label settings.
static QgsAbstractVectorLayerLabeling * create(const QDomElement &element)
Try to create instance of an implementation based on the XML data.
Abstract base class - its implementations define different approaches to the labeling of a vector lay...
Basic implementation of the labeling interface.
QVariant customProperty(const QString &value, const QVariant &defaultValue=QVariant()) const
Read a custom property from layer.
QDomElement createElement(const QString &tagName)
Represents a vector layer which manages a vector based data sets.