79 QVariant value()
const;
92 QString label()
const;
101 void setValue(
const QVariant &value );
117 void setLabel(
const QString &label );
124 bool renderState()
const;
131 void setRenderState(
bool render );
138 QString dump()
const;
143 void toSld( QDomDocument &doc, QDomElement &element, QVariantMap props )
const;
146 SIP_PYOBJECT __repr__();
148 const QString
str = !sipCpp->value().isValid()
149 ? QStringLiteral(
"<QgsRendererCategory>" )
150 : sipCpp->label().isEmpty()
151 ? QStringLiteral(
"<QgsRendererCategory: %1>" ).arg( sipCpp->value().toString() )
152 : QStringLiteral(
"<QgsRendererCategory: %1 (%2)>" ).arg( sipCpp->value().toString(), sipCpp->label() );
153 sipRes = PyUnicode_FromString(
str.toUtf8().constData() );
192 QSet<QString> usedAttributes(
const QgsRenderContext &context )
const override;
193 bool filterNeedsGeometry()
const override;
194 QString dump()
const override;
196 void toSld( QDomDocument &doc, QDomElement &element, const QVariantMap &props = QVariantMap() ) const override;
218 int categoryIndexForValue(
const QVariant &val );
224 int categoryIndexForLabel(
const QString &val );
235 bool updateCategoryValue(
int catIndex,
const QVariant &value );
258 bool updateCategoryLabel(
int catIndex,
const QString &label );
272 bool updateCategoryRenderState(
int catIndex,
bool render );
286 bool deleteCategory(
int catIndex );
293 void deleteAllCategories();
298 void moveCategory(
int from,
int to );
305 void sortByValue( Qt::SortOrder order = Qt::AscendingOrder );
312 void sortByLabel( Qt::SortOrder order = Qt::AscendingOrder );
340 QString legendKeyToExpression(
const QString &key,
QgsVectorLayer *layer,
bool &ok )
const override;
398 bool legendSymbolItemsCheckable() const override;
399 bool legendSymbolItemChecked( const QString &key ) override;
401 void checkLegendSymbolItem( const QString &key,
bool state = true ) override;
402 QString legendClassificationAttribute()
const override {
return classAttribute(); }
450 int matchToSymbols(
QgsStyle *style,
Qgis::SymbolType type,
451 QVariantList &unmatchedCategories
SIP_OUT, QStringList &unmatchedSymbols
SIP_OUT,
bool caseSensitive = true,
bool useTolerantMatch = false );
475 static QString displayString( const QVariant &value,
int precision = -1 );
492 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.