16 #ifndef QGSRULEBASEDRENDERERV2_H
17 #define QGSRULEBASEDRENDERERV2_H
91 QString dump(
int offset = 0 )
const;
99 bool isScaleOK(
double scale )
const;
103 bool dependsOnScale()
const {
return mScaleMinDenom != 0 || mScaleMaxDenom != 0; }
165 void appendChild(
Rule* rule );
167 void insertChild(
int i,
Rule* rule );
169 void removeChild(
Rule* rule );
171 void removeChildAt(
int i );
173 void takeChild(
Rule* rule );
175 Rule* takeChildAt(
int i );
181 void updateElseRules();
221 virtual bool renderFeature(
QgsFeature& feature,
QgsRenderContext& context,
int layer = -1,
bool selected =
false,
bool drawVertexMarker =
false )
override;
245 virtual bool legendSymbolItemsCheckable()
const override;
249 virtual bool legendSymbolItemChecked(
QString key )
override;
253 virtual void checkLegendSymbolItem(
QString key,
bool state =
true )
override;
265 virtual QString dump()
const override;
269 virtual bool willRenderFeature(
QgsFeature& feat )
override;
279 virtual int capabilities()
override {
return MoreSymbolsPerFeature | Filter | ScaleDependent; }
292 static void refineRuleScales( Rule* initialRule,
QList<int> scales );
311 #endif // QGSRULEBASEDRENDERERV2_H
Class for parsing and evaluation of expressions (formerly called "search strings").
QString description() const
void setScaleMaxDenom(int scaleMaxDenom)
void setLabel(QString label)
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)
void setCheckState(bool state)
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
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
FeatureToRender(QgsFeature &_f, int _flags)
bool dependsOnScale() const
int scaleMaxDenom() const
Contains information about the context of a rendering operation.
QString filterExpression() const
QList< int > mSymbolNormZLevels
When drawing a vector layer with rule-based renderer, it goes through the rules and draws features wi...
void setDescription(QString description)
QList< RenderLevel > RenderQueue
void setScaleMinDenom(int scaleMinDenom)
void setFilterExpression(QString filterExp)
QList< FeatureToRender > mCurrentFeatures