|
| Rule (const Rule &rh)=delete |
| Rules cannot be copied. More...
|
|
| Rule (QgsSymbol *symbol, int maximumScale=0, int minimumScale=0, const QString &filterExp=QString(), const QString &label=QString(), const QString &description=QString(), bool elseRule=false) |
| Constructor takes ownership of the symbol. More...
|
|
| ~Rule () |
|
bool | accept (QgsStyleEntityVisitorInterface *visitor) const |
| Accepts the specified symbology visitor, causing it to visit all child rules associated with the rule. More...
|
|
bool | active () const |
| Returns if this rule is active. More...
|
|
void | appendChild (QgsRuleBasedRenderer::Rule *rule) |
| add child rule, take ownership, sets this as parent More...
|
|
const QgsRuleBasedRenderer::RuleList & | children () const |
| Returns all children rules of this rule. More...
|
|
QgsRuleBasedRenderer::Rule * | clone () const |
| clone this rule, return new instance More...
|
|
QSet< int > | collectZLevels () |
| Gets all used z-levels from this rule and children. More...
|
|
bool | dependsOnScale () const |
|
QgsRuleBasedRenderer::RuleList | descendants () const |
| Returns all children, grand-children, grand-grand-children, grand-gra... you get it. More...
|
|
QString | description () const |
| A human readable description for this rule. More...
|
|
QString | dump (int indent=0) const |
| Dump for debug purpose. More...
|
|
QgsExpression * | filter () const |
| A filter that will check if this rule applies. More...
|
|
QString | filterExpression () const |
| A filter that will check if this rule applies. More...
|
|
QgsRuleBasedRenderer::Rule * | findRuleByKey (const QString &key) |
| Try to find a rule given its unique key. More...
|
|
void | insertChild (int i, QgsRuleBasedRenderer::Rule *rule) |
| add child rule, take ownership, sets this as parent More...
|
|
bool | isElse () const |
| Check if this rule is an ELSE rule. More...
|
|
bool | isFilterOK (const QgsFeature &f, QgsRenderContext *context=nullptr) const |
| Check if a given feature shall be rendered by this rule. More...
|
|
bool | isScaleOK (double scale) const |
| Check if this rule applies for a given scale. More...
|
|
QString | label () const |
|
QSet< QString > | legendKeysForFeature (const QgsFeature &feature, QgsRenderContext *context=nullptr) |
| Returns which legend keys match the feature. More...
|
|
QgsLegendSymbolList | legendSymbolItems (int currentLevel=-1) const |
|
double | maximumScale () const |
| Returns the maximum map scale (i.e. More...
|
|
double | minimumScale () const |
| Returns the minimum map scale (i.e. More...
|
|
bool | needsGeometry () const |
| Returns true if this rule or one of its children needs the geometry to be applied. More...
|
|
Rule & | operator= (const Rule &rh)=delete |
| Rules cannot be copied. More...
|
|
QgsRuleBasedRenderer::Rule * | parent () |
| The parent rule. More...
|
|
void | removeChild (QgsRuleBasedRenderer::Rule *rule) |
| delete child rule More...
|
|
void | removeChildAt (int i) |
| delete child rule More...
|
|
QgsRuleBasedRenderer::Rule::RenderResult | renderFeature (QgsRuleBasedRenderer::FeatureToRender &featToRender, QgsRenderContext &context, QgsRuleBasedRenderer::RenderQueue &renderQueue) |
| Render a given feature, will recursively call subclasses and only render if the constraints apply. More...
|
|
QString | ruleKey () const |
| Unique rule identifier (for identification of rule within renderer) More...
|
|
QgsRuleBasedRenderer::RuleList | rulesForFeature (const QgsFeature &feature, QgsRenderContext *context=nullptr, bool onlyActive=true) |
| Returns the list of rules used to render the feature in a specific context. More...
|
|
QDomElement | save (QDomDocument &doc, QgsSymbolMap &symbolMap) const |
|
void | setActive (bool state) |
| Sets if this rule is active. More...
|
|
void | setDescription (const QString &description) |
| Set a human readable description for this rule. More...
|
|
void | setFilterExpression (const QString &filterExp) |
| Set the expression used to check if a given feature shall be rendered with this rule. More...
|
|
void | setIsElse (bool iselse) |
| Sets if this rule is an ELSE rule. More...
|
|
void | setLabel (const QString &label) |
|
void | setMaximumScale (double scale) |
| Sets the maximum map scale (i.e. More...
|
|
void | setMinimumScale (double scale) |
| Sets the minimum map scale (i.e. More...
|
|
void | setNormZLevels (const QMap< int, int > &zLevelsToNormLevels) |
| assign normalized z-levels [0..N-1] for this rule's symbol for quick access during rendering More...
|
|
void | setRuleKey (const QString &key) |
| Override the assigned rule key (should be used just internally by rule-based renderer) More...
|
|
void | setSymbol (QgsSymbol *sym) |
| Sets a new symbol (or nullptr ). Deletes old symbol. More...
|
|
bool | startRender (QgsRenderContext &context, const QgsFields &fields, QString &filter) |
| prepare the rule for rendering and its children (build active children array) More...
|
|
void | stopRender (QgsRenderContext &context) |
| Stop a rendering process. More...
|
|
QgsSymbol * | symbol () |
|
QgsSymbolList | symbols (const QgsRenderContext &context=QgsRenderContext()) const |
|
QgsSymbolList | symbolsForFeature (const QgsFeature &feature, QgsRenderContext *context=nullptr) |
| tell which symbols will be used to render the feature More...
|
|
QgsRuleBasedRenderer::Rule * | takeChild (QgsRuleBasedRenderer::Rule *rule) |
| take child rule out, set parent as nullptr More...
|
|
QgsRuleBasedRenderer::Rule * | takeChildAt (int i) |
| take child rule out, set parent as nullptr More...
|
|
void | toSld (QDomDocument &doc, QDomElement &element, QVariantMap props) const |
| Saves the symbol layer as SLD. More...
|
|
QSet< QString > | usedAttributes (const QgsRenderContext &context) const |
| Returns the attributes used to evaluate the expression of this rule. More...
|
|
bool | willRenderFeature (const QgsFeature &feature, QgsRenderContext *context=nullptr) |
| only tell whether a feature will be rendered without actually rendering it More...
|
|