15 #ifndef QGSGRADUATEDSYMBOLRENDERERV2_H
16 #define QGSGRADUATEDSYMBOLRENDERERV2_H
21 #include <QScopedPointer>
33 double lowerValue()
const;
34 double upperValue()
const;
37 QString label()
const;
40 void setLabel( QString label );
41 void setLowerValue(
double lowerValue );
42 void setUpperValue(
double upperValue );
47 void toSld( QDomDocument& doc, QDomElement &element,
QgsStringMap props )
const;
79 virtual QString
dump()
const;
83 virtual void toSld( QDomDocument& doc, QDomElement &element )
const;
96 bool updateRangeSymbol(
int rangeIndex,
QgsSymbolV2* symbol );
97 bool updateRangeLabel(
int rangeIndex, QString label );
98 bool updateRangeUpperValue(
int rangeIndex,
double value );
99 bool updateRangeLowerValue(
int rangeIndex,
double value );
104 void deleteClass(
int idx );
105 void deleteAllClasses();
108 void moveClass(
int from,
int to );
110 void sortByValue( Qt::SortOrder order = Qt::AscendingOrder );
111 void sortByLabel( Qt::SortOrder order = Qt::AscendingOrder );
133 bool inverted =
false );
139 virtual QDomElement
save( QDomDocument& doc );
172 void setSizeScaleField( QString fieldOrExpression );
174 QString sizeScaleField()
const;
203 #endif // QGSGRADUATEDSYMBOLRENDERERV2_H
QList< QgsRendererRangeV2 > QgsRangeList
virtual void setRotationField(QString fieldName)
sets rotation field of renderer (if supported by the renderer)
void setInvertedColorRamp(bool inverted)
QList< QgsSymbolV2 * > QgsSymbolV2List
QScopedPointer< QgsVectorColorRampV2 > mSourceColorRamp
virtual QString dump() const
for debugging
QString classAttribute() const
virtual QDomElement save(QDomDocument &doc)
store renderer info to XML element
virtual QgsLegendSymbolList legendSymbolItems(double scaleDenominator=-1, QString rule="")
return a list of item text / symbol
Container of fields for a vector layer.
QHash< QgsSymbolV2 *, QgsSymbolV2 * > mTempSymbols
temporary symbols, used for data-defined rotation and scaling
virtual QList< QString > usedAttributes()=0
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
QMap< QString, QString > QgsStringMap
virtual QgsLegendSymbologyList legendSymbologyItems(QSize iconSize)
return a list of symbology items for the legend
virtual void startRender(QgsRenderContext &context, const QgsFields &fields)=0
virtual void stopRender(QgsRenderContext &context)=0
virtual QString rotationField() const
return rotation field name (or empty string if not set or not supported by renderer) ...
QScopedPointer< QgsSymbolV2 > mSymbol
virtual QgsSymbolV2List symbols()=0
for symbol levels
QScopedPointer< QgsExpression > mExpression
virtual QgsFeatureRendererV2 * clone()=0
QgsSymbolV2::ScaleMethod scaleMethod() const
virtual int capabilities()
returns bitwise OR-ed capabilities of the renderer
const QgsRangeList & ranges()
void setClassAttribute(QString attr)
QList< QPair< QString, QPixmap > > QgsLegendSymbologyList
virtual void toSld(QDomDocument &doc, QDomElement &element) const
used from subclasses to create SLD Rule elements following SLD v1.1 specs
Contains information about the context of a rendering operation.
int mAttrNum
attribute index (derived from attribute name in startRender)
QScopedPointer< QgsSymbolV2 > mSourceSymbol
QScopedPointer< QgsExpression > mRotation
QgsSymbolV2::ScaleMethod mScaleMethod
QScopedPointer< QgsExpression > mSizeScale
Represents a vector layer which manages a vector based data sets.
QList< QPair< QString, QgsSymbolV2 * > > QgsLegendSymbolList
virtual QgsSymbolV2 * symbolForFeature(QgsFeature &feature)=0
to be overridden