73 QVariant value()
const;
86 QString label()
const;
95 void setValue(
const QVariant &value );
111 void setLabel(
const QString &label );
117 bool renderState()
const;
123 void setRenderState(
bool render );
130 QString dump()
const;
135 void toSld( QDomDocument &doc, QDomElement &element, QVariantMap props )
const;
138 SIP_PYOBJECT __repr__();
140 const QString
str = !sipCpp->value().isValid()
141 ? QStringLiteral(
"<QgsRendererCategory>" )
142 : sipCpp->label().isEmpty()
143 ? QStringLiteral(
"<QgsRendererCategory: %1>" ).arg( sipCpp->value().toString() )
144 : QStringLiteral(
"<QgsRendererCategory: %1 (%2)>" ).arg( sipCpp->value().toString(), sipCpp->label() );
145 sipRes = PyUnicode_FromString(
str.toUtf8().constData() );
183 QSet<QString> usedAttributes(
const QgsRenderContext &context )
const override;
184 bool filterNeedsGeometry()
const override;
185 QString dump()
const override;
187 void toSld( QDomDocument &doc, QDomElement &element, const QVariantMap &props = QVariantMap() ) const override;
209 int categoryIndexForValue(
const QVariant &val );
214 int categoryIndexForLabel(
const QString &val );
225 bool updateCategoryValue(
int catIndex,
const QVariant &value );
248 bool updateCategoryLabel(
int catIndex,
const QString &label );
261 bool updateCategoryRenderState(
int catIndex,
bool render );
275 bool deleteCategory(
int catIndex );
282 void deleteAllCategories();
287 void moveCategory(
int from,
int to );
294 void sortByValue( Qt::SortOrder order = Qt::AscendingOrder );
301 void sortByLabel( Qt::SortOrder order = Qt::AscendingOrder );
329 QString legendKeyToExpression(
const QString &key,
QgsVectorLayer *layer,
bool &ok )
const override;
386 bool legendSymbolItemsCheckable() const override;
387 bool legendSymbolItemChecked( const QString &key ) override;
389 void checkLegendSymbolItem( const QString &key,
bool state = true ) override;
390 QString legendClassificationAttribute()
const override {
return classAttribute(); }
435 int matchToSymbols(
QgsStyle *style,
Qgis::SymbolType type,
436 QVariantList &unmatchedCategories
SIP_OUT, QStringList &unmatchedSymbols
SIP_OUT,
bool caseSensitive = true,
bool useTolerantMatch = false );
460 static QString displayString( const QVariant &value,
int precision = -1 );
477 bool mCounting = false;
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.