QGIS/python/core/auto_generated/symbology/qgssinglesymbolrenderer.sip.in
Nyall Dawson 590d1aae9d [FEATURE][API] Visitor API for style entities
Adds a new visitor pattern API for creation of visitors which visit
all the style entities (symbols, color ramps, text formats, and
label styles) associated with different objects. Can be used on a
renderer, map layer, or project wide level.

E.g. on a project wide level, allows collection of ALL the style
symbols/color ramps/text settings inside a project, including those
in layouts or annotations!
2019-07-06 12:36:54 +10:00

137 lines
4.9 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/symbology/qgssinglesymbolrenderer.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsSingleSymbolRenderer : QgsFeatureRenderer
{
%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
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 QgsStringMap &props = QgsStringMap() ) const;
static QgsFeatureRenderer *createFromSld( QDomElement &element, QgsWkbTypes::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 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``.
.. versionadded:: 2.5
%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.
.. versionadded:: 3.0
%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.
.. versionadded:: 3.0
%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.pl again *
************************************************************************/