16 #ifndef QGSRULEBASEDRENDERERV2_H
17 #define QGSRULEBASEDRENDERERV2_H
105 QString dump(
int indent = 0 )
const;
136 bool isScaleOK(
double scale )
const;
140 bool dependsOnScale()
const {
return mScaleMinDenom != 0 || mScaleMaxDenom != 0; }
171 bool active()
const {
return mIsActive; }
304 void appendChild(
Rule* rule );
307 void insertChild(
int i,
Rule* rule );
310 void removeChild(
Rule* rule );
313 void removeChildAt(
int i );
316 void takeChild(
Rule* rule );
319 Rule* takeChildAt(
int i );
330 void updateElseRules();
381 virtual bool renderFeature(
QgsFeature& feature,
QgsRenderContext& context,
int layer = -1,
bool selected =
false,
bool drawVertexMarker =
false )
override;
387 virtual QString filter()
override;
407 virtual bool legendSymbolItemsCheckable()
const override;
411 virtual bool legendSymbolItemChecked(
const QString& key )
override;
415 virtual void checkLegendSymbolItem(
const QString& key,
bool state =
true )
override;
427 virtual QString dump()
const override;
441 virtual int capabilities()
override {
return MoreSymbolsPerFeature | Filter | ScaleDependent; }
454 static void refineRuleScales( Rule* initialRule,
QList<int> scales );
475 #endif // QGSRULEBASEDRENDERERV2_H
Class for parsing and evaluation of expressions (formerly called "search strings").
void setLabel(const QString &label)
QString description() const
A human readable description for this rule.
QSet< int > mSymbolNormZLevels
void setActive(bool state)
Sets if this rule is active.
void setScaleMaxDenom(int scaleMaxDenom)
Set the maximum denominator for which this rule shall apply.
Container of fields for a vector layer.
RenderJob(FeatureToRender &_ftr, QgsSymbolV2 *_s)
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
void setIsElse(bool iselse)
Sets if this rule is an ELSE rule.
bool isElse()
Check if this rule is an ELSE rule.
void setCheckState(bool state)
void setDescription(const QString &description)
Set a human readable description for this rule.
int scaleMinDenom() const
virtual int capabilities() override
returns bitwise OR-ed capabilities of the renderer
This class keeps data about a rules for rule-based renderer.
void setRuleKey(const QString &key)
Override the assigned rule key (should be used just internally by rule-based renderer) ...
QgsExpression * filter() const
A filter that will check if this rule applies.
QString ruleKey() const
Unique rule identifier (for identification of rule within renderer)
QList< RenderJob * > jobs
Rule * mRootRule
the root node with hierarchical list of rules
RuleList descendants() const
Returns all children, grand-children, grand-grand-children, grand-gra...
FeatureToRender(QgsFeature &_f, int _flags)
bool dependsOnScale() const
int scaleMaxDenom() const
Contains information about the context of a rendering operation.
QString filterExpression() const
A filter that will check if this rule applies.
RenderResult
The result of rendering a rule.
Rule * parent()
The parent rule.
When drawing a vector layer with rule-based renderer, it goes through the rules and draws features wi...
RuleList & children()
Return all children rules of this rule.
QList< RenderLevel > RenderQueue
void setFilterExpression(const QString &filterExp)
Set the expression used to check if a given feature shall be rendered with this rule.
void setScaleMinDenom(int scaleMinDenom)
Set the minimum denominator for which this rule shall apply.
bool active() const
Returns if this rule is active.
QList< FeatureToRender > mCurrentFeatures