@@ -1171,6 +1171,8 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
1171
1171
1172
1172
/* *
1173
1173
* Adds a tab (for the attribute editor form) holding groups and fields
1174
+ *
1175
+ * @deprecated Use `editFormConfig()->addTab()` instead
1174
1176
*/
1175
1177
Q_DECL_DEPRECATED void addAttributeEditorWidget ( QgsAttributeEditorElement* data ) {mEditFormConfig ->addTab ( data );}
1176
1178
@@ -1180,6 +1182,8 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
1180
1182
* @param fieldIdx The index of the field
1181
1183
*
1182
1184
* @return The id for the editor widget or a NULL string if not applicable
1185
+ *
1186
+ * @deprecated Use `editFormConfig()->widgetType()` instead
1183
1187
*/
1184
1188
Q_DECL_DEPRECATED const QString editorWidgetV2 ( int fieldIdx ) const { return mEditFormConfig ->widgetType ( fieldIdx ); }
1185
1189
@@ -1191,6 +1195,8 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
1191
1195
* @return The id for the editor widget or a NULL string if not applicable
1192
1196
*
1193
1197
* @note python method name editorWidgetV2ByName
1198
+ *
1199
+ * @deprecated Use `editFormConfig()->widgetType()` instead
1194
1200
*/
1195
1201
Q_DECL_DEPRECATED const QString editorWidgetV2 ( const QString& fieldName ) const { return mEditFormConfig ->widgetType ( fieldName ); }
1196
1202
@@ -1200,6 +1206,8 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
1200
1206
* @param fieldIdx The index of the field
1201
1207
*
1202
1208
* @return The configuration for the editor widget or an empty config if the field does not exist
1209
+ *
1210
+ * @deprecated Use `editFormConfig()->widgetConfig()` instead
1203
1211
*/
1204
1212
Q_DECL_DEPRECATED const QgsEditorWidgetConfig editorWidgetV2Config ( int fieldIdx ) const { return mEditFormConfig ->widgetConfig ( fieldIdx ); }
1205
1213
@@ -1211,11 +1219,15 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
1211
1219
* @return The configuration for the editor widget or an empty config if the field does not exist
1212
1220
*
1213
1221
* @note python method name is editorWidgetV2ConfigByName
1222
+ *
1223
+ * @deprecated Use `editFormConfig()->widgetConfig()` instead
1214
1224
*/
1215
1225
Q_DECL_DEPRECATED const QgsEditorWidgetConfig editorWidgetV2Config ( const QString& fieldName ) const { return mEditFormConfig ->widgetConfig ( fieldName ); }
1216
1226
1217
1227
/* *
1218
1228
* Returns a list of tabs holding groups and fields
1229
+ *
1230
+ * @deprecated Use `editFormConfig()->tabs()` instead
1219
1231
*/
1220
1232
Q_DECL_DEPRECATED QList< QgsAttributeEditorElement* > attributeEditorElements () { return mEditFormConfig ->tabs (); }
1221
1233
@@ -1290,21 +1302,27 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
1290
1302
/* *
1291
1303
* Get edit type
1292
1304
*
1293
- * @deprecated Use editorWidgetV2() instead
1305
+ * @deprecated Use `editFormConfig()->widgetType()` instead
1294
1306
*/
1295
1307
Q_DECL_DEPRECATED EditType editType ( int idx );
1296
1308
1297
1309
/* *
1298
1310
* Get edit type
1299
1311
*
1300
- * @deprecated Use setEditorWidgetV2() instead
1312
+ * @deprecated Use `editFormConfig()->setWidgetType()` instead
1301
1313
*/
1302
1314
Q_DECL_DEPRECATED void setEditType ( int idx, EditType edit );
1303
1315
1304
- /* * Get the active layout for the attribute editor for this layer */
1316
+ /* *
1317
+ * Get the active layout for the attribute editor for this layer
1318
+ * @deprecated Use `editFormConfig()->layout()` instead
1319
+ */
1305
1320
Q_DECL_DEPRECATED EditorLayout editorLayout () { return ( EditorLayout )mEditFormConfig ->layout (); }
1306
1321
1307
- /* * Set the active layout for the attribute editor for this layer */
1322
+ /* *
1323
+ * Set the active layout for the attribute editor for this layer
1324
+ * @deprecated Use `editFormConfig()->setLayout()` instead
1325
+ */
1308
1326
Q_DECL_DEPRECATED void setEditorLayout ( EditorLayout editorLayout ) { mEditFormConfig ->setLayout (( QgsEditFormConfig::EditorLayout )editorLayout ); }
1309
1327
1310
1328
/* *
@@ -1334,6 +1352,8 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
1334
1352
*
1335
1353
* @param attrIdx Index of the field
1336
1354
* @param widgetType Type id of the editor widget to use
1355
+ *
1356
+ * @deprecated Use `editFormConfig()->setWidgetType()` instead
1337
1357
*/
1338
1358
Q_DECL_DEPRECATED void setEditorWidgetV2 ( int attrIdx, const QString& widgetType ) { mEditFormConfig ->setWidgetType ( attrIdx, widgetType ); }
1339
1359
@@ -1351,28 +1371,41 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
1351
1371
* @param config The config to set for this field
1352
1372
*
1353
1373
* @see setEditorWidgetV2() for a list of widgets and choose the widget to see the available options.
1374
+ *
1375
+ * @deprecated Use `editFormConfig()->setWidgetConfig()` instead
1354
1376
*/
1355
1377
Q_DECL_DEPRECATED void setEditorWidgetV2Config ( int attrIdx, const QgsEditorWidgetConfig& config ) { mEditFormConfig ->setWidgetConfig ( attrIdx, config ); }
1356
1378
1357
1379
/* *
1358
1380
* Set string representing 'true' for a checkbox
1359
1381
*
1360
- * @deprecated Use setEditorWidgetV2Config() instead
1382
+ * @deprecated Use @deprecated Use `editFormConfig()->setWidgetConfig()` instead
1361
1383
*/
1362
1384
Q_DECL_DEPRECATED void setCheckedState ( int idx, const QString& checked, const QString& notChecked );
1363
1385
1364
- /* * Get edit form */
1386
+ /* *
1387
+ * Get edit form
1388
+ *
1389
+ * @deprecated Use `editFormConfig()->uiForm()` instead
1390
+ */
1365
1391
Q_DECL_DEPRECATED QString editForm () const { return mEditFormConfig ->uiForm (); }
1366
1392
1367
- /* * Set edit form */
1393
+ /* *
1394
+ * Set edit form
1395
+ * @deprecated Use `editFormConfig()->setUiForm()` instead
1396
+ */
1368
1397
Q_DECL_DEPRECATED void setEditForm ( const QString& ui ) { mEditFormConfig ->setUiForm ( ui ); }
1369
1398
1370
1399
/* * Type of feature form pop-up suppression after feature creation (overrides app setting)
1371
- * @note added in 2.1 */
1400
+ * @note added in 2.1
1401
+ * @deprecated Use `editFormConfig()->suppress()` instead
1402
+ */
1372
1403
Q_DECL_DEPRECATED QgsVectorLayer::FeatureFormSuppress featureFormSuppress () const { return ( FeatureFormSuppress )mEditFormConfig ->suppress (); }
1373
1404
1374
1405
/* * Set type of feature form pop-up suppression after feature creation (overrides app setting)
1375
- * @note added in 2.1 */
1406
+ * @note added in 2.1
1407
+ * @deprecated Use `editFormConfig()->setSuppress()` instead
1408
+ */
1376
1409
Q_DECL_DEPRECATED void setFeatureFormSuppress ( QgsVectorLayer::FeatureFormSuppress s ) { mEditFormConfig ->setSuppress (( QgsEditFormConfig::FeatureFormSuppress )s ); }
1377
1410
1378
1411
/* * Get annotation form */
@@ -1381,22 +1414,30 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
1381
1414
/* * Set annotation form for layer */
1382
1415
void setAnnotationForm ( const QString& ui );
1383
1416
1384
- /* * Get python function for edit form initialization */
1417
+ /* *
1418
+ * Get python function for edit form initialization
1419
+ *
1420
+ * @deprecated Use `editFormConfig()->initFunction()` instead
1421
+ */
1385
1422
Q_DECL_DEPRECATED QString editFormInit () const { return mEditFormConfig ->initFunction (); }
1386
1423
1387
- /* * Set python function for edit form initialization */
1424
+ /* *
1425
+ * Set python function for edit form initialization
1426
+ *
1427
+ * @deprecated Use `editFormConfig()->setInitFunction()` instead
1428
+ */
1388
1429
Q_DECL_DEPRECATED void setEditFormInit ( const QString& function ) { mEditFormConfig ->setInitFunction ( function ); }
1389
1430
1390
1431
/* *
1391
1432
* Access value map
1392
- * @deprecated Use editorWidgetV2Config() instead
1433
+ * @deprecated Use `editFormConfig()->widgetConfig()` instead
1393
1434
*/
1394
1435
Q_DECL_DEPRECATED QMap<QString, QVariant> valueMap ( int idx );
1395
1436
1396
1437
/* *
1397
1438
* Access range widget config data
1398
1439
*
1399
- * @deprecated Use editorWidgetV2Config() instead
1440
+ * @deprecated Use `editFormConfig()->widgetConfig()` instead
1400
1441
*/
1401
1442
Q_DECL_DEPRECATED RangeData range ( int idx );
1402
1443
@@ -1414,27 +1455,40 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
1414
1455
/* *
1415
1456
* Access date format
1416
1457
*
1417
- * @deprecated Use setEditorWidgetV2Config() instead
1458
+ * @deprecated Use `editFormConfig()->widgetConfig()` instead
1418
1459
*/
1419
1460
Q_DECL_DEPRECATED QString dateFormat ( int idx );
1420
1461
1421
1462
/* *
1422
1463
* Access widget size for photo and webview widget
1423
1464
*
1424
- * @deprecated Use setEditorWidgetV2Config() instead
1465
+ * @deprecated Use `editFormConfig()->widgetConfig()` instead
1425
1466
*/
1426
1467
Q_DECL_DEPRECATED QSize widgetSize ( int idx );
1427
1468
1428
- /* * Is edit widget editable **/
1429
- Q_DECL_DEPRECATED bool fieldEditable ( int idx ) { return mEditFormConfig ->fieldEditable ( idx ); }
1469
+ /* *
1470
+ * Is edit widget editable
1471
+ *
1472
+ * @deprecated Use `editFormConfig()->readOnly()` instead
1473
+ */
1474
+ Q_DECL_DEPRECATED bool fieldEditable ( int idx ) { return mEditFormConfig ->readOnly ( idx ); }
1430
1475
1431
- /* * Label widget on top **/
1476
+ /* *
1477
+ * Label widget on top
1478
+ * @deprecated Use `editFormConfig()->labelOnTop()` instead
1479
+ */
1432
1480
Q_DECL_DEPRECATED bool labelOnTop ( int idx ) { return mEditFormConfig ->labelOnTop ( idx ); }
1433
1481
1434
- /* * Set edit widget editable **/
1435
- Q_DECL_DEPRECATED void setFieldEditable ( int idx, bool editable ) { mEditFormConfig ->setFieldEditable ( idx, editable ); }
1482
+ /* *
1483
+ * Set edit widget editable
1484
+ * @deprecated Use `editFormConfig()->setReadOnly()` instead
1485
+ */
1486
+ Q_DECL_DEPRECATED void setReadOnly ( int idx, bool editable ) { mEditFormConfig ->setFieldEditable ( idx, editable ); }
1436
1487
1437
- /* * Label widget on top **/
1488
+ /* *
1489
+ * Label widget on top
1490
+ * @deprecated Use `editFormConfig()->setLabelOnTop()` instead
1491
+ */
1438
1492
Q_DECL_DEPRECATED void setLabelOnTop ( int idx, bool onTop ) { mEditFormConfig ->setLabelOnTop ( idx, onTop ); }
1439
1493
1440
1494
// ! Buffer with uncommitted editing operations. Only valid after editing has been turned on.
0 commit comments