File: qgsrelationreferencewidget.sip.in

package info (click to toggle)
qgis 3.40.10%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,183,672 kB
  • sloc: cpp: 1,595,771; python: 372,544; 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: 161
file content (312 lines) | stat: -rw-r--r-- 7,634 bytes parent folder | download | duplicates (4)
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
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/gui/editorwidgets/qgsrelationreferencewidget.h                   *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/





%ModuleHeaderCode
// fix to allow compilation with sip that for some reason
// doesn't add this include to the file where the code from
// ConvertToSubClassCode goes.
#include <qgsrelationreferencewidget.h>
%End

class QgsRelationReferenceWidget : QWidget
{

%TypeHeaderCode
#include "qgsrelationreferencewidget.h"
%End
%ConvertToSubClassCode
    if ( qobject_cast<QgsRelationReferenceWidget *>( sipCpp ) )
      sipType = sipType_QgsRelationReferenceWidget;
    else
      sipType = NULL;
%End
  public:
    enum CanvasExtent /BaseType=IntEnum/
    {
      Fixed,
      Pan,
      Scale
    };

    explicit QgsRelationReferenceWidget( QWidget *parent /TransferThis/ );

    ~QgsRelationReferenceWidget();

    void setRelation( const QgsRelation &relation, bool allowNullValue );

    void setRelationEditable( bool editable );

 void setForeignKey( const QVariant &value ) /Deprecated/;
%Docstring
this sets the related feature using from the foreign key

.. deprecated:: 3.10

   Use setForeignKeys.
%End

    void setForeignKeys( const QVariantList &values );
%Docstring
Sets the related feature using the foreign keys

.. versionadded:: 3.10
%End

 QVariant foreignKey() const /Deprecated/;
%Docstring
returns the related feature foreign key

.. deprecated:: 3.10
%End


    QVariantList foreignKeys() const;
%Docstring
Returns the related feature foreign keys

.. versionadded:: 3.10
%End

    void setEditorContext( const QgsAttributeEditorContext &context, QgsMapCanvas *canvas, QgsMessageBar *messageBar );
%Docstring
Sets the editor ``context``

.. note::

   if context cadDockWidget is null, it won't be possible to digitize
   the geometry of a referenced feature from this widget
%End

    bool embedForm();
%Docstring
determines if the form of the related feature will be shown
%End
    void setEmbedForm( bool display );

    bool readOnlySelector();
%Docstring
determines if the drop-down is enabled
%End
    void setReadOnlySelector( bool readOnly );

    bool allowMapIdentification();
%Docstring
determines if the widget offers the possibility to select the related
feature on the map (using a dedicated map tool)
%End
    void setAllowMapIdentification( bool allowMapIdentification );

    void setFilterFields( const QStringList &filterFields );
%Docstring
Sets the fields for which filter comboboxes will be created
%End

    bool openFormButtonVisible();
%Docstring
determines the open form button is visible in the widget
%End
    void setOpenFormButtonVisible( bool openFormButtonVisible );

    bool chainFilters() const;
%Docstring
Determines if the filters are chained

:return: ``True`` if filters are chained
%End

    void setChainFilters( bool chainFilters );
%Docstring
Set if filters are chained. Chained filters restrict the option of
subsequent filters based on the selection of a previous filter.

:param chainFilters: If chaining should be enabled
%End

    QString filterExpression() const;
%Docstring
Returns the currently set filter expression.
%End
    void setFilterExpression( const QString &filterExpression );
%Docstring
If not empty, will be used as filter expression. Only if this evaluates
to ``True``, the value will be shown.
%End

    QgsFeature referencedFeature() const;
%Docstring
Returns the related feature (from the referenced layer) if no feature is
related, it returns an invalid feature
%End

    void showIndeterminateState();
%Docstring
Sets the widget to display in an indeterminate "mixed value" state.
%End

    bool allowAddFeatures() const;
%Docstring
Determines if a button for adding new features should be shown.
%End

    void setAllowAddFeatures( bool allowAddFeatures );
%Docstring
Determines if a button for adding new features should be shown.
%End

    QgsRelation relation() const;
%Docstring
Returns the current relation, which might be invalid

.. versionadded:: 3.10
%End

    void setFormFeature( const QgsFeature &formFeature );
%Docstring
Set the current form feature (from the referencing layer)

.. versionadded:: 3.10
%End

    void setParentFormFeature( const QgsFeature &parentFormFeature );
%Docstring
Set the current parent form feature

.. versionadded:: 3.42.2
%End

    QString referencedLayerDataSource() const;
%Docstring
Returns the public data source of the referenced layer

.. versionadded:: 3.12
%End

    void setReferencedLayerDataSource( const QString &referencedLayerDataSource );
%Docstring
Set the public data source of the referenced layer to
``referencedLayerDataSource``

.. versionadded:: 3.12
%End

    QString referencedLayerProviderKey() const;
%Docstring
Returns the data provider key of the referenced layer

.. versionadded:: 3.12
%End

    void setReferencedLayerProviderKey( const QString &referencedLayerProviderKey );
%Docstring
Set the data provider key of the referenced layer to
``referencedLayerProviderKey``

.. versionadded:: 3.12
%End

    QString referencedLayerId() const;
%Docstring
Returns the id of the referenced layer

.. versionadded:: 3.12
%End

    void setReferencedLayerId( const QString &referencedLayerId );
%Docstring
Set the id of the referenced layer to ``referencedLayerId``

.. versionadded:: 3.12
%End

    QString referencedLayerName() const;
%Docstring
Returns the name of the referenced layer

.. versionadded:: 3.12
%End

    void setReferencedLayerName( const QString &referencedLayerName );
%Docstring
Set the name of the referenced layer to ``referencedLayerName``

.. versionadded:: 3.12
%End

    int fetchLimit() const;
%Docstring
Returns the limit of fetched features (0 means all features)

.. versionadded:: 3.32
%End

    void setFetchLimit( int fetchLimit );
%Docstring
Set the limit of fetched features (0 means all features)

.. versionadded:: 3.32
%End

  public slots:
    void openForm();
%Docstring
open the form of the related feature in a new dialog
%End

    void mapIdentification();
%Docstring
activate the map tool to select a new related feature on the map
%End

    void deleteForeignKeys();
%Docstring
unset the currently related feature
%End

    bool saveReferencedAttributeForm();
%Docstring
Trigger save of the embedded referenced attribute form. Returns ``True``
on success or if no embedded form is present.

.. versionadded:: 3.40
%End

  protected:
    virtual void showEvent( QShowEvent *e );


    void init();

  signals:

 void foreignKeyChanged( const QVariant &key ) /Deprecated/;
%Docstring
Emitted when the foreign key changed

.. deprecated:: 3.10
%End

    void foreignKeysChanged( const QVariantList &keys );
%Docstring
Emitted when the foreign keys changed

.. versionadded:: 3.10
%End

};

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