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() );
185 QSet<QString> usedAttributes(
const QgsRenderContext &context )
const override;
186 bool filterNeedsGeometry()
const override;
187 QString dump()
const override;
189 void toSld( QDomDocument &doc, QDomElement &element, const QVariantMap &props = QVariantMap() ) const override;
211 int categoryIndexForValue(
const QVariant &val );
216 int categoryIndexForLabel(
const QString &val );
227 bool updateCategoryValue(
int catIndex,
const QVariant &value );
250 bool updateCategoryLabel(
int catIndex,
const QString &label );
263 bool updateCategoryRenderState(
int catIndex,
bool render );
277 bool deleteCategory(
int catIndex );
284 void deleteAllCategories();
289 void moveCategory(
int from,
int to );
296 void sortByValue( Qt::SortOrder order = Qt::AscendingOrder );
303 void sortByLabel( Qt::SortOrder order = Qt::AscendingOrder );
331 QString legendKeyToExpression(
const QString &key,
QgsVectorLayer *layer,
bool &ok )
const override;
388 bool legendSymbolItemsCheckable() const override;
389 bool legendSymbolItemChecked( const QString &key ) override;
391 void checkLegendSymbolItem( const QString &key,
bool state = true ) override;
392 QString legendClassificationAttribute()
const override {
return classAttribute(); }
437 int matchToSymbols(
QgsStyle *style,
Qgis::SymbolType type,
438 QVariantList &unmatchedCategories
SIP_OUT, QStringList &unmatchedSymbols
SIP_OUT,
bool caseSensitive = true,
bool useTolerantMatch = false );
462 static QString displayString( const QVariant &value,
int precision = -1 );
479 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.