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() );
184 QSet<QString> usedAttributes(
const QgsRenderContext &context )
const override;
185 bool filterNeedsGeometry()
const override;
186 QString dump()
const override;
188 void toSld( QDomDocument &doc, QDomElement &element, const QVariantMap &props = QVariantMap() ) const override;
210 int categoryIndexForValue(
const QVariant &val );
215 int categoryIndexForLabel(
const QString &val );
226 bool updateCategoryValue(
int catIndex,
const QVariant &value );
249 bool updateCategoryLabel(
int catIndex,
const QString &label );
262 bool updateCategoryRenderState(
int catIndex,
bool render );
276 bool deleteCategory(
int catIndex );
283 void deleteAllCategories();
288 void moveCategory(
int from,
int to );
295 void sortByValue( Qt::SortOrder order = Qt::AscendingOrder );
302 void sortByLabel( Qt::SortOrder order = Qt::AscendingOrder );
330 QString legendKeyToExpression(
const QString &key,
QgsVectorLayer *layer,
bool &ok )
const override;
387 bool legendSymbolItemsCheckable() const override;
388 bool legendSymbolItemChecked( const QString &key ) override;
390 void checkLegendSymbolItem( const QString &key,
bool state = true ) override;
391 QString legendClassificationAttribute()
const override {
return classAttribute(); }
436 int matchToSymbols(
QgsStyle *style,
Qgis::SymbolType type,
437 QVariantList &unmatchedCategories
SIP_OUT, QStringList &unmatchedSymbols
SIP_OUT,
bool caseSensitive = true,
bool useTolerantMatch = false );
461 static QString displayString( const QVariant &value,
int precision = -1 );
478 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.