16 #ifndef QGSRULEBASEDRENDERERV2_H
17 #define QGSRULEBASEDRENDERERV2_H
88 Rule(
QgsSymbolV2* symbol,
int scaleMinDenom = 0,
int scaleMaxDenom = 0, QString filterExp = QString(),
89 QString label = QString(), QString description = QString(),
bool elseRule =
false );
92 QString dump(
int offset = 0 )
const;
93 QSet<QString> usedAttributes();
98 bool isScaleOK(
double scale )
const;
101 QString
label()
const {
return mLabel; }
102 bool dependsOnScale()
const {
return mScaleMinDenom != 0 || mScaleMaxDenom != 0; }
120 void toSld( QDomDocument& doc, QDomElement &element,
QgsStringMap props );
128 QSet<int> collectZLevels();
131 void setNormZLevels(
const QMap<int, int>& zLevelsToNormLevels );
155 void appendChild(
Rule* rule );
157 void insertChild(
int i,
Rule* rule );
159 void removeChild(
Rule* rule );
161 void removeChildAt(
int i );
163 void takeChild(
Rule* rule );
165 Rule* takeChildAt(
int i );
167 void updateElseRules();
178 QString mFilterExp,
mLabel, mDescription;
204 virtual bool renderFeature(
QgsFeature& feature,
QgsRenderContext& context,
int layer = -1,
bool selected =
false,
bool drawVertexMarker =
false );
210 virtual QList<QString> usedAttributes();
214 virtual void toSld( QDomDocument& doc, QDomElement &element )
const;
221 virtual QDomElement save( QDomDocument& doc );
229 virtual QgsLegendSymbolList legendSymbolItems(
double scaleDenominator = -1, QString rule =
"" );
232 virtual QString dump()
const;
237 virtual bool willRenderFeature(
QgsFeature& feat );
247 virtual int capabilities() {
return MoreSymbolsPerFeature | Filter | ScaleDependent; }
260 static void refineRuleScales( Rule* initialRule, QList<int> scales );
271 #endif // QGSRULEBASEDRENDERERV2_H