15 #ifndef QGSCATEGORIZEDSYMBOLRENDERER_H    16 #define QGSCATEGORIZEDSYMBOLRENDERER_H    18 #include "qgis_core.h"    70     QVariant value() 
const;
    83     QString label() 
const;
    92     void setValue( 
const QVariant &value );
   101     void setSymbol( 
QgsSymbol *s SIP_TRANSFER );
   108     void setLabel( 
const QString &label );
   115     bool renderState() 
const;
   122     void setRenderState( 
bool render );
   129     QString dump() 
const;
   134     void toSld( QDomDocument &doc, QDomElement &element, 
QgsStringMap props ) 
const;
   171     QString 
dump() 
const override;
   194     int categoryIndexForValue( 
const QVariant &val );
   200     int categoryIndexForLabel( 
const QString &val );
   211     bool updateCategoryValue( 
int catIndex, 
const QVariant &value );
   234     bool updateCategoryLabel( 
int catIndex, 
const QString &label );
   248     bool updateCategoryRenderState( 
int catIndex, 
bool render );
   262     bool deleteCategory( 
int catIndex );
   269     void deleteAllCategories();
   274     void moveCategory( 
int from, 
int to );
   281     void sortByValue( Qt::SortOrder order = Qt::AscendingOrder );
   288     void sortByLabel( Qt::SortOrder order = Qt::AscendingOrder );
   332     void setSourceSymbol( 
QgsSymbol *sym SIP_TRANSFER );
   347     void setSourceColorRamp( 
QgsColorRamp *ramp SIP_TRANSFER );
   354     void updateColorRamp( 
QgsColorRamp *ramp SIP_TRANSFER );
   406                         QVariantList &unmatchedCategories 
SIP_OUT, QStringList &unmatchedSymbols SIP_OUT, 
bool caseSensitive = 
true, 
bool useTolerantMatch = 
false );
   435     bool mCounting = 
false;
   465     QgsSymbol *symbolForValue( const QVariant &value, 
bool &foundMatchingSymbol SIP_OUT ) const 
SIP_PYNAME( symbolForValue2 );
   480 #endif // QGSCATEGORIZEDSYMBOLRENDERER_H The class is used as a container of context for various read/write operations on other objects...
 
virtual QgsLegendSymbolList legendSymbolItems() const
Returns a list of symbology items for the legend. 
 
QList< QgsLegendSymbolItem > QgsLegendSymbolList
 
Represents an individual category (class) from a QgsCategorizedSymbolRenderer. 
 
Abstract base class for all rendered symbols. 
 
virtual void toSld(QDomDocument &doc, QDomElement &element, const QgsStringMap &props=QgsStringMap()) const
used from subclasses to create SLD Rule elements following SLD v1.1 specs 
 
Features may be filtered, i.e. some features may not be rendered (categorized, rule based ...
 
virtual QDomElement save(QDomDocument &doc, const QgsReadWriteContext &context)
store renderer info to XML element 
 
Abstract base class for color ramps. 
 
virtual QString filter(const QgsFields &fields=QgsFields())
If a renderer does not require all the features this method may be overridden and return an expressio...
 
QString classAttribute() const
Returns the class attribute for the renderer, which is the field name or expression string from the l...
 
Container of fields for a vector layer. 
 
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
 
std::unique_ptr< QgsSymbol > mSourceSymbol
 
QMap< QString, QString > QgsStringMap
 
virtual QgsSymbol * symbolForFeature(const QgsFeature &feature, QgsRenderContext &context) const =0
To be overridden. 
 
QList< QgsRendererCategory > QgsCategoryList
 
SymbolType
Type of the symbol. 
 
virtual QSet< QString > usedAttributes(const QgsRenderContext &context) const =0
Returns a list of attributes required by this renderer. 
 
QList< QgsSymbol * > QgsSymbolList
 
const QgsCategoryList & categories() const
Returns a list of all categories recognized by the renderer. 
 
std::unique_ptr< QgsSymbol > mSymbol
 
QgsCategoryList mCategories
 
virtual QgsSymbol * originalSymbolForFeature(const QgsFeature &feature, QgsRenderContext &context) const
Returns symbol for feature. 
 
void setClassAttribute(const QString &attr)
Sets the class attribute for the renderer, which is the field name or expression string from the laye...
 
virtual bool legendSymbolItemChecked(const QString &key)
items of symbology items in legend is checked 
 
virtual void checkLegendSymbolItem(const QString &key, bool state=true)
item in symbology was checked 
 
virtual void setLegendSymbolItem(const QString &key, QgsSymbol *symbol)
Sets the symbol to be used for a legend symbol item. 
 
Contains information about the context of a rendering operation. 
 
virtual QgsSymbolList symbols(QgsRenderContext &context) const
Returns list of symbols used by the renderer. 
 
virtual void startRender(QgsRenderContext &context, const QgsFields &fields)
Must be called when a new render cycle is started. 
 
std::unique_ptr< QgsColorRamp > mSourceColorRamp
 
QString legendClassificationAttribute() const override
If supported by the renderer, return classification attribute for the use in legend. 
 
virtual void stopRender(QgsRenderContext &context)
Must be called when a render cycle has finished, to allow the renderer to clean up. 
 
virtual QSet< QString > legendKeysForFeature(const QgsFeature &feature, QgsRenderContext &context) const
Returns legend keys matching a specified feature. 
 
QHash< QString, QgsSymbol * > mSymbolHash
hashtable for faster access to symbols 
 
virtual bool legendSymbolItemsCheckable() const
items of symbology items in legend should be checkable 
 
virtual bool filterNeedsGeometry() const
Returns true if this renderer requires the geometry to apply the filter. 
 
Represents a vector layer which manages a vector based data sets. 
 
Object that keeps configuration of appearance of marker symbol's data-defined size in legend...
 
std::unique_ptr< QgsExpression > mExpression
 
QgsFeatureRenderer::Capabilities capabilities() override
Returns details about internals of this renderer. 
 
virtual QgsFeatureRenderer * clone() const =0
Create a deep copy of this renderer. 
 
std::unique_ptr< QgsDataDefinedSizeLegend > mDataDefinedSizeLegend
 
virtual QString dump() const
Returns debug information about this renderer.