QGIS/python/core/auto_generated/symbology/qgssinglesymbolrenderer.sip.in
Nyall Dawson f1b8682e36 Improve API for exporting to SLD
Deprecate old methods and make methods always take QgsSldExportContext.
Add capacity to QgsSldExportContext to collect export errors and
warnings.

The old API had no way to reliably report errors/warnings during
export to users.
2025-05-04 17:55:25 +10:00

148 lines
5.2 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/symbology/qgssinglesymbolrenderer.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsSingleSymbolRenderer : QgsFeatureRenderer
{
%Docstring(signature="appended")
A feature renderer which renders all features with the same symbol.
%End
%TypeHeaderCode
#include "qgssinglesymbolrenderer.h"
%End
public:
QgsSingleSymbolRenderer( QgsSymbol *symbol /Transfer/ );
%Docstring
Constructor for QgsSingleSymbolRenderer.
The same ``symbol`` will be used to render every feature. Ownership of
``symbol`` is transferred to the renderer.
%End
~QgsSingleSymbolRenderer();
virtual Qgis::FeatureRendererFlags flags() const;
virtual QgsSymbol *symbolForFeature( const QgsFeature &feature, QgsRenderContext &context ) const;
virtual QgsSymbol *originalSymbolForFeature( const QgsFeature &feature, QgsRenderContext &context ) const;
virtual void startRender( QgsRenderContext &context, const QgsFields &fields );
virtual void stopRender( QgsRenderContext &context );
virtual QSet<QString> usedAttributes( const QgsRenderContext &context ) const;
virtual bool accept( QgsStyleEntityVisitorInterface *visitor ) const;
QgsSymbol *symbol() const;
%Docstring
Returns the symbol which will be rendered for every feature.
.. seealso:: :py:func:`setSymbol`
%End
void setSymbol( QgsSymbol *s /Transfer/ );
%Docstring
Sets the symbol which will be rendered for every feature. Ownership of
the symbol is transferred to the renderer.
.. seealso:: :py:func:`symbol`
%End
virtual QString dump() const;
virtual QgsSingleSymbolRenderer *clone() const /Factory/;
virtual void toSld( QDomDocument &doc, QDomElement &element, const QVariantMap &props = QVariantMap() ) const /Deprecated/;
virtual bool toSld( QDomDocument &doc, QDomElement &element, QgsSldExportContext &context ) const;
static QgsFeatureRenderer *createFromSld( QDomElement &element, Qgis::GeometryType geomType ) /Factory/;
%Docstring
Creates a new single symbol renderer from an SLD ``element``.
The geometry type for features to be rendered must be specified via the
``geomType`` argument.
The caller takes ownership of the returned renderer.
%End
virtual QgsFeatureRenderer::Capabilities capabilities();
virtual QgsSymbolList symbols( QgsRenderContext &context ) const;
static QgsFeatureRenderer *create( QDomElement &element, const QgsReadWriteContext &context ) /Factory/;
%Docstring
Creates a new single symbol renderer from an XML ``element``, using the
supplied read/write ``context``.
The caller takes ownership of the returned renderer.
%End
virtual QDomElement save( QDomDocument &doc, const QgsReadWriteContext &context );
virtual QgsLegendSymbolList legendSymbolItems() const;
virtual QSet< QString > legendKeysForFeature( const QgsFeature &feature, QgsRenderContext &context ) const;
virtual QString legendKeyToExpression( const QString &key, QgsVectorLayer *layer, bool &ok ) const;
virtual void setLegendSymbolItem( const QString &key, QgsSymbol *symbol /Transfer/ );
static QgsSingleSymbolRenderer *convertFromRenderer( const QgsFeatureRenderer *renderer ) /Factory/;
%Docstring
Creates a new single symbol renderer from an existing ``renderer``.
:return: a new renderer if the conversion was possible, otherwise
``None``.
%End
void setDataDefinedSizeLegend( QgsDataDefinedSizeLegend *settings /Transfer/ );
%Docstring
Configures appearance of legend when renderer is configured to use
data-defined size for marker symbols. This allows configuring which
values (symbol sizes) should be shown in the legend, whether to display
different symbol sizes collapsed in one legend node or separated across
multiple legend nodes etc.
When renderer does not use data-defined size or does not use marker
symbols, these settings will be ignored. Takes ownership of the passed
settings objects. ``None`` is a valid input that disables data-defined
size legend.
%End
QgsDataDefinedSizeLegend *dataDefinedSizeLegend() const;
%Docstring
Returns configuration of appearance of legend when using data-defined
size for marker symbols. Will return ``None`` if the functionality is
disabled.
%End
protected:
private:
QgsSingleSymbolRenderer( const QgsSingleSymbolRenderer & );
QgsSingleSymbolRenderer &operator=( const QgsSingleSymbolRenderer & );
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/symbology/qgssinglesymbolrenderer.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/