16 #ifndef QGSRULEBASEDRENDERERV2_H 17 #define QGSRULEBASEDRENDERERV2_H 86 : zIndex( other.zIndex )
131 QString dump(
int indent = 0 )
const;
142 bool needsGeometry()
const;
168 bool isScaleOK(
double scale )
const;
172 bool dependsOnScale()
const {
return mScaleMinDenom != 0 || mScaleMaxDenom != 0; }
197 Q_DECL_DEPRECATED
bool checkState()
const {
return mIsActive; }
204 bool active()
const {
return mIsActive; }
238 void setFilterExpression(
const QString& filterExp );
349 void appendChild(
Rule* rule );
352 void insertChild(
int i,
Rule* rule );
355 void removeChild(
Rule* rule );
358 void removeChildAt(
int i );
364 Rule* takeChildAt(
int i );
375 void updateElseRules();
382 void setIsElse(
bool iselse );
431 virtual bool renderFeature(
QgsFeature& feature,
QgsRenderContext& context,
int layer = -1,
bool selected =
false,
bool drawVertexMarker =
false )
override;
441 virtual bool filterNeedsGeometry()
const override;
462 virtual bool legendSymbolItemsCheckable()
const override;
466 virtual bool legendSymbolItemChecked(
const QString& key )
override;
470 virtual void checkLegendSymbolItem(
const QString& key,
bool state =
true )
override;
484 virtual QString dump()
const override;
500 virtual int capabilities()
override {
return MoreSymbolsPerFeature | Filter | ScaleDependent; }
513 static void refineRuleScales(
Rule* initialRule,
QList<int> scales );
534 #endif // QGSRULEBASEDRENDERERV2_H bool active() const
Returns if this rule is active.
Class for parsing and evaluation of expressions (formerly called "search strings").
QgsExpression * filter() const
A filter that will check if this rule applies.
void setLabel(const QString &label)
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...
bool isElse()
Check if this rule is an ELSE rule.
QString description() const
A human readable description for this rule.
Q_DECL_DEPRECATED bool checkState() const
void setDescription(const QString &description)
Set a human readable description for this rule.
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) ...
RuleList descendants() const
Returns all children, grand-children, grand-grand-children, grand-gra...
QList< RenderJob * > jobs
int scaleMaxDenom() const
Rule * mRootRule
the root node with hierarchical list of rules
FeatureToRender(QgsFeature &_f, int _flags)
QString filterExpression() const
A filter that will check if this rule applies.
Contains information about the context of a rendering operation.
RenderResult
The result of rendering a rule.
QString ruleKey() const
Unique rule identifier (for identification of rule within renderer)
Rule * parent()
The parent rule.
When drawing a vector layer with rule-based renderer, it goes through the rules and draws features wi...
bool dependsOnScale() const
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.
int scaleMinDenom() const
QList< FeatureToRender > mCurrentFeatures
RenderLevel(const RenderLevel &other)