File: qgsmergedfeaturerenderer.sip.in

package info (click to toggle)
qgis 3.40.11%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,183,800 kB
  • sloc: cpp: 1,595,841; python: 372,637; xml: 23,474; sh: 3,761; perl: 3,664; ansic: 2,257; sql: 2,137; yacc: 1,068; lex: 577; javascript: 540; lisp: 411; makefile: 154
file content (160 lines) | stat: -rw-r--r-- 5,792 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/symbology/qgsmergedfeaturerenderer.h                        *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/


class QgsMergedFeatureRenderer : QgsFeatureRenderer
{
%Docstring(signature="appended")
:py:class:`QgsMergedFeatureRenderer` is a polygon or line-only feature
renderer used to renderer a set of features merged (or dissolved) into a
single geometry.

It is designed on top of another feature renderer, which is called
"embedded" Most of the methods are then only proxies to the embedded
renderer. E.g. if the embedded renderer is a categorized renderer, then
all the matching features for each categorized class will be dissolved
together. Features from different classes will NOT be dissolved
together.

.. versionadded:: 3.18
%End

%TypeHeaderCode
#include "qgsmergedfeaturerenderer.h"
%End
  public:

    QgsMergedFeatureRenderer( QgsFeatureRenderer *embeddedRenderer /Transfer/ );
%Docstring
Constructor for QgsMergedFeatureRenderer.

:param embeddedRenderer: optional embeddedRenderer. Ownership will be
                         transferred.
%End


    static QgsFeatureRenderer *create( QDomElement &element, const QgsReadWriteContext &context ) /Factory/;
%Docstring
Creates a renderer out of an XML, for loading
%End

    virtual QgsMergedFeatureRenderer *clone() const /Factory/;

    virtual void startRender( QgsRenderContext &context, const QgsFields &fields );

    virtual Qgis::FeatureRendererFlags flags() const;


    virtual bool renderFeature( const QgsFeature &feature, QgsRenderContext &context, int layer = -1, bool selected = false, bool drawVertexMarker = false ) throw( QgsCsException );

%Docstring
Renders a given feature. This will here collect features. The actual
rendering will be postponed to
:py:func:`~QgsMergedFeatureRenderer.stopRender`

:param feature: the feature to render
:param context: the rendering context
:param layer: the symbol layer to render, if that makes sense
:param selected: whether this feature has been selected (this will add
                 decorations)
:param drawVertexMarker: whether this feature has vertex markers (in
                         edit mode usually)

:return: ``True`` if the rendering was OK
%End

    virtual void stopRender( QgsRenderContext &context );

%Docstring
The actual rendering will take place here. Features collected during
:py:func:`~QgsMergedFeatureRenderer.renderFeature` are rendered using
the embedded feature renderer
%End

    virtual QString dump() const;

    virtual QSet<QString> usedAttributes( const QgsRenderContext &context ) const;

    virtual bool filterNeedsGeometry() const;

    virtual QgsFeatureRenderer::Capabilities capabilities();

    virtual QgsSymbolList symbols( QgsRenderContext &context ) const;

    virtual QgsSymbol *symbolForFeature( const QgsFeature &feature, QgsRenderContext &context ) const;

    virtual QgsSymbol *originalSymbolForFeature( const QgsFeature &feature, QgsRenderContext &context ) const;

    virtual QgsSymbolList symbolsForFeature( const QgsFeature &feature, QgsRenderContext &context ) const;

    virtual QgsSymbolList originalSymbolsForFeature( const QgsFeature &feature, QgsRenderContext &context ) const;

    virtual QSet< QString > legendKeysForFeature( const QgsFeature &feature, QgsRenderContext &context ) const;

    virtual QString legendKeyToExpression( const QString &key, QgsVectorLayer *layer, bool &ok ) const;

    virtual QgsLegendSymbolList legendSymbolItems() const;

    virtual bool willRenderFeature( const QgsFeature &feature, QgsRenderContext &context ) const;

    virtual QDomElement save( QDomDocument &doc, const QgsReadWriteContext &context );

    virtual void setEmbeddedRenderer( QgsFeatureRenderer *subRenderer /Transfer/ );

    virtual const QgsFeatureRenderer *embeddedRenderer() const;

    virtual void setLegendSymbolItem( const QString &key, QgsSymbol *symbol );

    virtual bool legendSymbolItemsCheckable() const;

    virtual bool legendSymbolItemChecked( const QString &key );

    virtual void checkLegendSymbolItem( const QString &key, bool state = true );

    virtual bool accept( QgsStyleEntityVisitorInterface *visitor ) const;


    static QgsMergedFeatureRenderer *convertFromRenderer( const QgsFeatureRenderer *renderer ) /Factory/;
%Docstring
Creates a QgsMergedFeatureRenderer by a conversion from an existing
renderer.

:return: a new renderer if the conversion was possible, otherwise
         ``None``.
%End

  protected:

    QgsMergedFeatureRenderer( const QString &type, QgsFeatureRenderer *embeddedRenderer /Transfer/ );
%Docstring
Constructor for QgsMergedFeatureRenderer.

:param type: renderer ID string
:param embeddedRenderer: optional embeddedRenderer. Ownership will be
                         transferred.
%End

    enum GeometryOperation /BaseType=IntEnum/
    {
      Merge,
      InvertOnly,
      MergeAndInvert,
    };



};


/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/symbology/qgsmergedfeaturerenderer.h                        *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/