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 );
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, QVariantMap props )
const;
170 QSet<QString> usedAttributes(
const QgsRenderContext &context )
const override;
171 bool filterNeedsGeometry()
const override;
172 QString dump()
const override;
174 void toSld( QDomDocument &doc, QDomElement &element, const QVariantMap &props = QVariantMap() ) const override;
196 int categoryIndexForValue(
const QVariant &val );
202 int categoryIndexForLabel(
const QString &val );
213 bool updateCategoryValue(
int catIndex,
const QVariant &value );
236 bool updateCategoryLabel(
int catIndex,
const QString &label );
250 bool updateCategoryRenderState(
int catIndex,
bool render );
264 bool deleteCategory(
int catIndex );
271 void deleteAllCategories();
276 void moveCategory(
int from,
int to );
283 void sortByValue( Qt::SortOrder order = Qt::AscendingOrder );
290 void sortByLabel( Qt::SortOrder order = Qt::AscendingOrder );
375 bool legendSymbolItemsCheckable() const override;
376 bool legendSymbolItemChecked( const QString &key ) override;
378 void checkLegendSymbolItem( const QString &key,
bool state = true ) override;
379 QString legendClassificationAttribute()
const override {
return classAttribute(); }
425 QVariantList &unmatchedCategories
SIP_OUT, QStringList &unmatchedSymbols
SIP_OUT,
bool caseSensitive =
true,
bool useTolerantMatch =
false );
454 bool mCounting =
false;
const QgsCategoryList & categories() const
Returns a list of all categories recognized by the renderer.
std::unique_ptr< QgsColorRamp > mSourceColorRamp
std::unique_ptr< QgsSymbol > mSourceSymbol
QHash< QString, QgsSymbol * > mSymbolHash
hashtable for faster access to symbols
QgsCategoryList mCategories
std::unique_ptr< QgsExpression > mExpression
std::unique_ptr< QgsDataDefinedSizeLegend > mDataDefinedSizeLegend
QString classAttribute() const
Returns the class attribute for the renderer, which is the field name or expression string from the l...
void setClassAttribute(const QString &attr)
Sets the class attribute for the renderer, which is the field name or expression string from the laye...
~QgsCategorizedSymbolRenderer() override
Abstract base class for color ramps.
Object that keeps configuration of appearance of marker symbol's data-defined size in legend.
Class for parsing and evaluation of expressions (formerly called "search strings").
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
Container of fields for a vector layer.
The class is used as a container of context for various read/write operations on other objects.
Contains information about the context of a rendering operation.
Represents an individual category (class) from a QgsCategorizedSymbolRenderer.
std::unique_ptr< QgsSymbol > mSymbol
QgsRendererCategory()=default
Constructor for QgsRendererCategory.
An interface for classes which can visit style entity (e.g.
Abstract base class for all rendered symbols.
SymbolType
Type of the symbol.
Represents a vector layer which manages a vector based data sets.
QList< QgsRendererCategory > QgsCategoryList
QList< QgsLegendSymbolItem > QgsLegendSymbolList
QList< QgsSymbol * > QgsSymbolList