15 #ifndef QGSCATEGORIZEDSYMBOLRENDERERV2_H
16 #define QGSCATEGORIZEDSYMBOLRENDERERV2_H
23 #include <QScopedPointer>
42 QVariant value()
const;
44 QString label()
const;
46 void setValue(
const QVariant &value );
48 void setLabel(
const QString &label );
53 void toSld( QDomDocument& doc, QDomElement &element,
QgsStringMap props )
const;
81 virtual QString
dump()
const;
85 virtual void toSld( QDomDocument& doc, QDomElement &element )
const;
98 int categoryIndexForValue( QVariant val );
100 bool updateCategoryValue(
int catIndex,
const QVariant &value );
101 bool updateCategorySymbol(
int catIndex,
QgsSymbolV2* symbol );
102 bool updateCategoryLabel(
int catIndex, QString label );
105 bool deleteCategory(
int catIndex );
106 void deleteAllCategories();
109 void moveCategory(
int from,
int to );
111 void sortByValue( Qt::SortOrder order = Qt::AscendingOrder );
112 void sortByLabel( Qt::SortOrder order = Qt::AscendingOrder );
121 virtual QDomElement
save( QDomDocument& doc );
147 void setSizeScaleField( QString fieldOrExpression );
149 QString sizeScaleField()
const;
182 #endif // QGSCATEGORIZEDSYMBOLRENDERERV2_H
QgsSymbolV2::ScaleMethod mScaleMethod
virtual void setRotationField(QString fieldName)
sets rotation field of renderer (if supported by the renderer)
const QgsCategoryList & categories() const
QList< QgsSymbolV2 * > QgsSymbolV2List
virtual QString dump() const
for debugging
virtual QDomElement save(QDomDocument &doc)
store renderer info to XML element
QScopedPointer< QgsSymbolV2 > mSourceSymbol
virtual QgsLegendSymbolList legendSymbolItems(double scaleDenominator=-1, QString rule="")
return a list of item text / symbol
QScopedPointer< QgsExpression > mRotation
Container of fields for a vector layer.
virtual QList< QString > usedAttributes()=0
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
QScopedPointer< QgsSymbolV2 > mSymbol
QMap< QString, QString > QgsStringMap
virtual QgsLegendSymbologyList legendSymbologyItems(QSize iconSize)
return a list of symbology items for the legend
QHash< QString, QgsSymbolV2 * > mSymbolHash
hashtable for faster access to symbols
virtual void startRender(QgsRenderContext &context, const QgsFields &fields)=0
QScopedPointer< QgsExpression > mSizeScale
QgsCategoryList mCategories
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) ...
virtual QgsSymbolV2List symbols()=0
for symbol levels
QList< QgsRendererCategoryV2 > QgsCategoryList
virtual QgsFeatureRendererV2 * clone()=0
QScopedPointer< QgsVectorColorRampV2 > mSourceColorRamp
void setClassAttribute(QString attr)
QHash< QString, QgsSymbolV2 * > mTempSymbols
temporary symbols, used for data-defined rotation and scaling
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)
QString classAttribute() const
QgsSymbolV2::ScaleMethod scaleMethod() const
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
virtual int capabilities()
returns bitwise OR-ed capabilities of the renderer
QScopedPointer< QgsExpression > mExpression
void setInvertedColorRamp(bool inverted)