16 #ifndef QGSRULEBASEDRENDERERV2_H 17 #define QGSRULEBASEDRENDERERV2_H 80 : zIndex( other.zIndex )
125 QString dump(
int indent = 0 )
const;
157 bool isScaleOK(
double scale )
const;
161 bool dependsOnScale()
const {
return mScaleMinDenom != 0 || mScaleMaxDenom != 0; }
186 Q_DECL_DEPRECATED
bool checkState()
const {
return mIsActive; }
193 bool active()
const {
return mIsActive; }
227 void setFilterExpression(
const QString& filterExp );
333 void appendChild(
Rule* rule );
336 void insertChild(
int i,
Rule* rule );
339 void removeChild(
Rule* rule );
342 void removeChildAt(
int i );
348 Rule* takeChildAt(
int i );
359 void updateElseRules();
366 void setIsElse(
bool iselse );
415 virtual bool renderFeature(
QgsFeature& feature,
QgsRenderContext& context,
int layer = -1,
bool selected =
false,
bool drawVertexMarker =
false )
override;
441 virtual bool legendSymbolItemsCheckable()
const override;
445 virtual bool legendSymbolItemChecked(
const QString& key )
override;
449 virtual void checkLegendSymbolItem(
const QString& key,
bool state =
true )
override;
463 virtual QString dump()
const override;
479 virtual int capabilities()
override {
return MoreSymbolsPerFeature | Filter | ScaleDependent; }
492 static void refineRuleScales(
Rule* initialRule,
QList<int> scales );
513 #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.
Q_DECL_DEPRECATED bool checkState() const
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...
bool isElse()
Check if this rule is an ELSE rule.
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
RenderLevel & operator=(const RenderLevel &rh)
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
Q_DECL_DEPRECATED void setCheckState(bool state)
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
RenderLevel(const RenderLevel &other)