79 QVariant value()
const;
92 QString label()
const;
101 void setValue(
const QVariant &value );
117 void setLabel(
const QString &label );
123 bool renderState()
const;
129 void setRenderState(
bool render );
136 QString dump()
const;
141 void toSld( QDomDocument &doc, QDomElement &element, QVariantMap props )
const;
144 SIP_PYOBJECT __repr__();
146 const QString
str = !sipCpp->value().isValid()
147 ? QStringLiteral(
"<QgsRendererCategory>" )
148 : sipCpp->label().isEmpty()
149 ? QStringLiteral(
"<QgsRendererCategory: %1>" ).arg( sipCpp->value().toString() )
150 : QStringLiteral(
"<QgsRendererCategory: %1 (%2)>" ).arg( sipCpp->value().toString(), sipCpp->label() );
151 sipRes = PyUnicode_FromString(
str.toUtf8().constData() );
190 QSet<QString> usedAttributes(
const QgsRenderContext &context )
const override;
191 bool filterNeedsGeometry()
const override;
192 QString dump()
const override;
194 void toSld( QDomDocument &doc, QDomElement &element, const QVariantMap &props = QVariantMap() ) const override;
216 int categoryIndexForValue(
const QVariant &val );
221 int categoryIndexForLabel(
const QString &val );
232 bool updateCategoryValue(
int catIndex,
const QVariant &value );
255 bool updateCategoryLabel(
int catIndex,
const QString &label );
268 bool updateCategoryRenderState(
int catIndex,
bool render );
282 bool deleteCategory(
int catIndex );
289 void deleteAllCategories();
294 void moveCategory(
int from,
int to );
301 void sortByValue( Qt::SortOrder order = Qt::AscendingOrder );
308 void sortByLabel( Qt::SortOrder order = Qt::AscendingOrder );
336 QString legendKeyToExpression(
const QString &key,
QgsVectorLayer *layer,
bool &ok )
const override;
393 bool legendSymbolItemsCheckable() const override;
394 bool legendSymbolItemChecked( const QString &key ) override;
396 void checkLegendSymbolItem( const QString &key,
bool state = true ) override;
397 QString legendClassificationAttribute()
const override {
return classAttribute(); }
442 int matchToSymbols(
QgsStyle *style,
Qgis::SymbolType type,
443 QVariantList &unmatchedCategories
SIP_OUT, QStringList &unmatchedSymbols
SIP_OUT,
bool caseSensitive = true,
bool useTolerantMatch = false );
467 static QString displayString( const QVariant &value,
int precision = -1 );
484 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.