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;
137 Q_DECL_DEPRECATED
void toSld( QDomDocument &doc, QDomElement &element, QVariantMap props )
const SIP_DEPRECATED;
144 bool toSld( QDomDocument &doc, QDomElement &element,
const QString &classAttribute,
QgsSldExportContext &context )
const;
147 SIP_PYOBJECT __repr__();
149 const QString str = !sipCpp->value().isValid()
150 ? QStringLiteral(
"<QgsRendererCategory>" )
151 : sipCpp->label().isEmpty()
152 ? QStringLiteral(
"<QgsRendererCategory: %1>" ).arg( sipCpp->value().toString() )
153 : QStringLiteral(
"<QgsRendererCategory: %1 (%2)>" ).arg( sipCpp->value().toString(), sipCpp->label() );
154 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
195 QSet<QString> usedAttributes(
const QgsRenderContext &context )
const override;
196 bool filterNeedsGeometry()
const override;
197 QString dump()
const override;
199 Q_DECL_DEPRECATED
void toSld( QDomDocument &doc, QDomElement &element, const QVariantMap &props = QVariantMap() ) const override
SIP_DEPRECATED;
200 bool toSld( QDomDocument &doc, QDomElement &element,
QgsSldExportContext &context ) const override;
222 int categoryIndexForValue(
const QVariant &val );
227 int categoryIndexForLabel(
const QString &val );
238 bool updateCategoryValue(
int catIndex,
const QVariant &value );
261 bool updateCategoryLabel(
int catIndex,
const QString &label );
274 bool updateCategoryRenderState(
int catIndex,
bool render );
288 bool deleteCategory(
int catIndex );
295 void deleteAllCategories();
300 void moveCategory(
int from,
int to );
307 void sortByValue( Qt::SortOrder order = Qt::AscendingOrder );
314 void sortByLabel( Qt::SortOrder order = Qt::AscendingOrder );
342 QString legendKeyToExpression(
const QString &key,
QgsVectorLayer *layer,
bool &ok )
const override;
399 bool legendSymbolItemsCheckable() const override;
400 bool legendSymbolItemChecked( const QString &key ) override;
402 void checkLegendSymbolItem( const QString &key,
bool state = true ) override;
403 QString legendClassificationAttribute()
const override {
return classAttribute(); }
448 int matchToSymbols(
QgsStyle *style,
Qgis::SymbolType type,
449 QVariantList &unmatchedCategories
SIP_OUT, QStringList &unmatchedSymbols
SIP_OUT,
bool caseSensitive = true,
bool useTolerantMatch = false );
473 static QString displayString( const QVariant &value,
int precision = -1 );
490 bool mCounting = false;
A container for the context for various read/write operations on objects.
Contains information about the context of a rendering operation.
Holds SLD export options and other information related to SLD export of a QGIS layer style.