15 #ifndef QGSRULEBASEDLABELING_H    16 #define QGSRULEBASEDLABELING_H    18 #include <QStringList>    78         bool dependsOnScale()
 const { 
return mScaleMinDenom != 0 || mScaleMaxDenom != 0; }
   115         bool active()
 const { 
return mIsActive; }
   121         bool isElse()
 const { 
return mElseRule; }
   177         const RuleList& 
children()
 const { 
return mChildren; }
   206         void appendChild( 
Rule* rule );
   209         void insertChild( 
int i, 
Rule* rule );
   212         void removeChildAt( 
int i );
   215         const Rule* findRuleByKey( 
const QString& key ) 
const;
   261         bool isScaleOK( 
double scale ) 
const;
   271         void updateElseRules();
   309     virtual QString type() 
const override;
   351 #endif // QGSRULEBASEDLABELING_H Class for parsing and evaluation of expressions (formerly called "search strings"). 
 
QgsPalLayerSettings * settings() const
Get the labeling settings. 
 
void setFilterExpression(const QString &filterExp)
Set the expression used to check if a given feature shall be rendered with this rule. 
 
QgsRuleBasedLabeling::RuleToProviderMap mSubProviders
label providers are owned by labeling engine 
 
const Rule * parent() const
The parent rule. 
 
RuleList descendants() const
Returns all children, grand-children, grand-grand-children, grand-gra... 
 
int scaleMinDenom() const
The minimum scale at which this label rule should be applied. 
 
bool isElse() const
Check if this rule is an ELSE rule. 
 
RegisterResult
The result of registering a rule. 
 
bool dependsOnScale() const
Determines if scale based labeling is active. 
 
const Rule * rootRule() const
 
QString description() const
A human readable description for this rule. 
 
The QgsVectorLayerLabelProvider class implements a label provider for vector layers. 
 
A geometry is the spatial representation of a feature. 
 
Rule * parent()
The parent rule. 
 
QMap< Rule *, QgsVectorLayerLabelProvider * > RuleToProviderMap
 
QString ruleKey() const
Unique rule identifier (for identification of rule within labeling, used as provider ID) ...
 
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
 
virtual QList< QgsAbstractLabelProvider * > subProviders()
Return list of child providers - useful if the provider needs to put labels into more layers with dif...
 
virtual bool prepare(const QgsRenderContext &context, QStringList &attributeNames)
Prepare for registration of features. 
 
void setScaleMinDenom(int scaleMinDenom)
Set the minimum denominator for which this rule shall apply. 
 
virtual void registerFeature(QgsFeature &feature, QgsRenderContext &context, QgsGeometry *obstacleGeometry=nullptr)
Register a feature for labeling as one or more QgsLabelFeature objects stored into mLabels...
 
void setActive(bool state)
Sets if this rule is active. 
 
void setRuleKey(const QString &key)
Override the assigned rule key (should be used just internally by rule-based labeling) ...
 
QgsPalLayerSettings * mSettings
 
Contains information about the context of a rendering operation. 
 
QString filterExpression() const
A filter that will check if this rule applies. 
 
const RuleList & children() const
Return all children rules of this rule. 
 
QgsRuleBasedLabeling mRules
owned copy 
 
Abstract base class - its implementations define different approaches to the labeling of a vector lay...
 
bool active() const
Returns if this rule is active. 
 
void setDescription(const QString &description)
Set a human readable description for this rule. 
 
void setScaleMaxDenom(int scaleMaxDenom)
Set the maximum denominator for which this rule shall apply. 
 
int scaleMaxDenom() const
The maximum scale denominator at which this label rule should be applied. 
 
void setIsElse(bool iselse)
Sets if this rule is an ELSE rule. 
 
RuleList & children()
Return all children rules of this rule. 
 
Represents a vector layer which manages a vector based data sets.