@@ -57,7 +57,6 @@ class QgsEditFormConfig : QObject
57
57
SuppressOff = 2 //!< Do not suppress feature form
58
58
};
59
59
60
-
61
60
/**
62
61
* This is only useful in combination with EditorLayout::TabLayout.
63
62
*
@@ -93,12 +92,6 @@ class QgsEditFormConfig : QObject
93
92
void setUiForm( const QString& ui );
94
93
95
94
96
-
97
-
98
-
99
-
100
-
101
-
102
95
// Widget stuff
103
96
104
97
/**
@@ -126,7 +119,7 @@ class QgsEditFormConfig : QObject
126
119
* <li>WebView (QgsWebViewWidgetWrapper)</li>
127
120
* </ul>
128
121
*
129
- * @param attrIdx Index of the field
122
+ * @param fieldIdx Index of the field
130
123
* @param widgetType Type id of the editor widget to use
131
124
*/
132
125
void setWidgetType( int fieldIdx, const QString& widgetType );
@@ -189,15 +182,13 @@ class QgsEditFormConfig : QObject
189
182
QgsEditorWidgetConfig widgetConfig( const QString& fieldName ) const;
190
183
191
184
/**
192
- * If this returns true, the field is manually set to read only.
185
+ * This returns true if the field is manually set to read only or if the field
186
+ * does not support editing like joins or vitual fields.
193
187
*/
194
188
bool readOnly( int idx );
195
189
196
190
/**
197
- * If set to false, the widget at the given index will be read-only, regardless of the
198
- * layer's editable state and data provider capacities.
199
- * If it is set to true, the widget's editable state will be synchronized with the layer's
200
- * edit state.
191
+ * If set to false, the widget at the given index will be read-only.
201
192
*/
202
193
void setReadOnly(int idx, bool readOnly );
203
194
@@ -229,16 +220,32 @@ class QgsEditFormConfig : QObject
229
220
// Python stuff
230
221
231
222
232
- /** Get python function for edit form initialization */
223
+ /**
224
+ * Get python function for edit form initialization.
225
+ * Will be looked up in a python file relative to the project folder if it
226
+ * includes a module name or if it's a pure function name it will searched
227
+ * in the python code set with @link setInitCode @endlink.
228
+ */
233
229
QString initFunction() const;
234
230
235
- /** Set python function for edit form initialization */
231
+ /**
232
+ * Set python function for edit form initialization.
233
+ * Will be looked up in a python file relative to the project folder if it
234
+ * includes a module name or if it's a pure function name it will searched
235
+ * in the python code set with @link setInitCode @endlink.
236
+ */
236
237
void setInitFunction( const QString& function );
237
238
238
- /** Get python code for edit form initialization */
239
+ /**
240
+ * Get python code for edit form initialization.
241
+ */
239
242
QString initCode() const;
240
243
241
- /** Set python code for edit form initialization */
244
+ /**
245
+ * Get python code for edit form initialization.
246
+ * Make sure that you also set the appropriate function name in
247
+ * @link setInitFunction @endlink
248
+ */
242
249
void setInitCode( const QString& code );
243
250
244
251
/** Return if python code shall be loaded for edit form initialization */
@@ -247,6 +254,8 @@ class QgsEditFormConfig : QObject
247
254
/** Set if python code shall be used for edit form initialization */
248
255
void setUseInitCode( const bool useCode );
249
256
257
+ /** Type of feature form pop-up suppression after feature creation (overrides app setting) */
250
258
FeatureFormSuppress suppress() const;
259
+ /** Set type of feature form pop-up suppression after feature creation (overrides app setting) */
251
260
void setSuppress( FeatureFormSuppress s );
252
261
};
0 commit comments