File: qgsvectorlayerjoininfo.sip.in

package info (click to toggle)
qgis 3.40.15%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,185,444 kB
  • sloc: cpp: 1,616,454; python: 372,967; xml: 23,474; sh: 3,761; perl: 3,664; ansic: 2,829; sql: 2,137; yacc: 1,068; lex: 577; javascript: 540; lisp: 411; makefile: 155
file content (265 lines) | stat: -rw-r--r-- 7,332 bytes parent folder | download | duplicates (18)
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/vector/qgsvectorlayerjoininfo.h                             *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/




class QgsVectorLayerJoinInfo
{
%Docstring(signature="appended")
Defines left outer join from our vector layer to some other vector
layer.

The join is done based on [our layer].targetField = [join
layer].joinField
%End

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

    QgsVectorLayerJoinInfo();

    void setJoinLayer( QgsVectorLayer *layer );
%Docstring
Sets weak reference to the joined layer
%End
    QgsVectorLayer *joinLayer() const;
%Docstring
Returns joined layer (may be ``None`` if the reference was set by layer
ID and not resolved yet)
%End

    void setJoinLayerId( const QString &layerId );
%Docstring
Sets ID of the joined layer. It will need to be overwritten by
:py:func:`~QgsVectorLayerJoinInfo.setJoinLayer` to a reference to real
layer
%End
    QString joinLayerId() const;
%Docstring
ID of the joined layer - may be used to resolve reference to the joined
layer
%End

    void setTargetFieldName( const QString &fieldName );
%Docstring
Sets name of the field of our layer that will be used for join
%End
    QString targetFieldName() const;
%Docstring
Returns name of the field of our layer that will be used for join
%End

    void setJoinFieldName( const QString &fieldName );
%Docstring
Sets name of the field of joined layer that will be used for join
%End
    QString joinFieldName() const;
%Docstring
Returns name of the field of joined layer that will be used for join
%End

    void setPrefix( const QString &prefix );
%Docstring
Sets prefix of fields from the joined layer. If ``None``, joined layer's
name will be used.
%End
    QString prefix() const;
%Docstring
Returns prefix of fields from the joined layer. If ``None``, joined
layer's name will be used.
%End

    void setUsingMemoryCache( bool enabled );
%Docstring
Sets whether values from the joined layer should be cached in memory to
speed up lookups
%End

    bool isUsingMemoryCache() const;
%Docstring
Returns whether values from the joined layer should be cached in memory
to speed up lookups. Will return ``False`` if upsertOnEdit is enabled.
%End

    bool isDynamicFormEnabled() const;
%Docstring
Returns whether the form has to be dynamically updated with joined
fields when a feature is being created in the target layer.
%End

    void setDynamicFormEnabled( bool enabled );
%Docstring
Sets whether the form has to be dynamically updated with joined fields
when a feature is being created in the target layer.
%End

    bool isEditable() const;
%Docstring
Returns whether joined fields may be edited through the form of the
target layer.
%End

    void setEditable( bool enabled );
%Docstring
Sets whether the form of the target layer allows editing joined fields.
%End

    bool hasUpsertOnEdit() const;
%Docstring
Returns whether a feature created on the target layer has to impact the
joined layer by creating a new feature if necessary.
%End

    void setUpsertOnEdit( bool enabled );
%Docstring
Sets whether a feature created on the target layer has to impact the
joined layer by creating a new feature if necessary.
%End

    bool hasCascadedDelete() const;
%Docstring
Returns whether a feature deleted on the target layer has to impact the
joined layer by deleting the corresponding joined feature.
%End

    void setCascadedDelete( bool enabled );
%Docstring
Sets whether a feature deleted on the target layer has to impact the
joined layer by deleting the corresponding joined feature.
%End

    QString prefixedFieldName( const QgsField &field ) const;
%Docstring
Returns the prefixed name of the field.

:param field: the field

:return: the prefixed name of the field
%End

    QgsFeature extractJoinedFeature( const QgsFeature &feature ) const;
%Docstring
Extract the join feature from the target feature for the current join
layer information.

:param feature: A feature from the target layer

:return: the corresponding joined feature
%End

 void setJoinFieldNamesBlackList( const QStringList &blackList ) /Deprecated/;
%Docstring
Sets a list of fields to ignore whatever happens.

.. deprecated:: 3.40

   Use :py:func:`~QgsVectorLayerJoinInfo.setJoinFieldNamesBlockList` instead.
%End

 QStringList joinFieldNamesBlackList() const /Deprecated/;
%Docstring
Returns the list of fields to ignore.

.. deprecated:: 3.40

   Use :py:func:`~QgsVectorLayerJoinInfo.joinFieldNamesBlockList` instead.
%End

    void setJoinFieldNamesBlockList( const QStringList &list );
%Docstring
Sets a ``list`` of fields to ignore whatever happens.

.. seealso:: :py:func:`joinFieldNamesBlockList`

.. versionadded:: 3.14
%End

    QStringList joinFieldNamesBlockList() const;
%Docstring
Returns the list of fields to ignore.

.. seealso:: :py:func:`setJoinFieldNamesBlockList`

.. versionadded:: 3.14
%End

    bool hasSubset( bool blocklisted = true ) const;
%Docstring
Returns ``True`` if blocklisted fields is not empty or if a subset of
names has been set.
%End

    static QStringList joinFieldNamesSubset( const QgsVectorLayerJoinInfo &info, bool blocklisted = true );
%Docstring
Returns the list of field names to use for joining considering
blocklisted fields and subset.

.. warning::

   This method is NOT thread safe, and MUST be called from the thread where the vector layers
   participating in the join reside. See variant which accepts a :py:class:`QgsFields` argument for a thread safe alternative.
%End

    static QStringList joinFieldNamesSubset( const QgsVectorLayerJoinInfo &info, const QgsFields &joinLayerFields, bool blocklisted = true );
%Docstring
Returns the list of field names to use for joining considering
blocklisted fields and subset.

This method is thread safe.

.. versionadded:: 3.30
%End

    bool operator==( const QgsVectorLayerJoinInfo &other ) const;

    void setJoinFieldNamesSubset( QStringList *fieldNamesSubset /Transfer/ );
%Docstring
Sets the subset of fields to be used from joined layer.

Ownership of ``fileNamesSubset`` is transferred. A ``fieldNameSubset``
of ``None`` indicates that all fields should be used.

.. seealso:: :py:func:`joinFieldNamesSubset`
%End

    QStringList *joinFieldNamesSubset() const;
%Docstring
Returns the subset of fields to be used from joined layer.

All fields will be used if ``None`` is returned.

.. seealso:: :py:func:`setJoinFieldNamesSubset`
%End

  protected:













};


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