Skip to content

Commit d70a47e

Browse files
committedNov 19, 2015
Document function name changes
1 parent a50f2d0 commit d70a47e

File tree

1 file changed

+75
-21
lines changed

1 file changed

+75
-21
lines changed
 

‎src/core/qgsvectorlayer.h

Lines changed: 75 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,6 +1171,8 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
11711171

11721172
/**
11731173
* Adds a tab (for the attribute editor form) holding groups and fields
1174+
*
1175+
* @deprecated Use `editFormConfig()->addTab()` instead
11741176
*/
11751177
Q_DECL_DEPRECATED void addAttributeEditorWidget( QgsAttributeEditorElement* data ) {mEditFormConfig->addTab( data );}
11761178

@@ -1180,6 +1182,8 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
11801182
* @param fieldIdx The index of the field
11811183
*
11821184
* @return The id for the editor widget or a NULL string if not applicable
1185+
*
1186+
* @deprecated Use `editFormConfig()->widgetType()` instead
11831187
*/
11841188
Q_DECL_DEPRECATED const QString editorWidgetV2( int fieldIdx ) const { return mEditFormConfig->widgetType( fieldIdx ); }
11851189

@@ -1191,6 +1195,8 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
11911195
* @return The id for the editor widget or a NULL string if not applicable
11921196
*
11931197
* @note python method name editorWidgetV2ByName
1198+
*
1199+
* @deprecated Use `editFormConfig()->widgetType()` instead
11941200
*/
11951201
Q_DECL_DEPRECATED const QString editorWidgetV2( const QString& fieldName ) const { return mEditFormConfig->widgetType( fieldName ); }
11961202

@@ -1200,6 +1206,8 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
12001206
* @param fieldIdx The index of the field
12011207
*
12021208
* @return The configuration for the editor widget or an empty config if the field does not exist
1209+
*
1210+
* @deprecated Use `editFormConfig()->widgetConfig()` instead
12031211
*/
12041212
Q_DECL_DEPRECATED const QgsEditorWidgetConfig editorWidgetV2Config( int fieldIdx ) const { return mEditFormConfig->widgetConfig( fieldIdx ); }
12051213

@@ -1211,11 +1219,15 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
12111219
* @return The configuration for the editor widget or an empty config if the field does not exist
12121220
*
12131221
* @note python method name is editorWidgetV2ConfigByName
1222+
*
1223+
* @deprecated Use `editFormConfig()->widgetConfig()` instead
12141224
*/
12151225
Q_DECL_DEPRECATED const QgsEditorWidgetConfig editorWidgetV2Config( const QString& fieldName ) const { return mEditFormConfig->widgetConfig( fieldName ); }
12161226

12171227
/**
12181228
* Returns a list of tabs holding groups and fields
1229+
*
1230+
* @deprecated Use `editFormConfig()->tabs()` instead
12191231
*/
12201232
Q_DECL_DEPRECATED QList< QgsAttributeEditorElement* > attributeEditorElements() { return mEditFormConfig->tabs(); }
12211233

@@ -1290,21 +1302,27 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
12901302
/**
12911303
* Get edit type
12921304
*
1293-
* @deprecated Use editorWidgetV2() instead
1305+
* @deprecated Use `editFormConfig()->widgetType()` instead
12941306
*/
12951307
Q_DECL_DEPRECATED EditType editType( int idx );
12961308

12971309
/**
12981310
* Get edit type
12991311
*
1300-
* @deprecated Use setEditorWidgetV2() instead
1312+
* @deprecated Use `editFormConfig()->setWidgetType()` instead
13011313
*/
13021314
Q_DECL_DEPRECATED void setEditType( int idx, EditType edit );
13031315

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+
*/
13051320
Q_DECL_DEPRECATED EditorLayout editorLayout() { return ( EditorLayout )mEditFormConfig->layout(); }
13061321

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+
*/
13081326
Q_DECL_DEPRECATED void setEditorLayout( EditorLayout editorLayout ) { mEditFormConfig->setLayout(( QgsEditFormConfig::EditorLayout )editorLayout ); }
13091327

13101328
/**
@@ -1334,6 +1352,8 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
13341352
*
13351353
* @param attrIdx Index of the field
13361354
* @param widgetType Type id of the editor widget to use
1355+
*
1356+
* @deprecated Use `editFormConfig()->setWidgetType()` instead
13371357
*/
13381358
Q_DECL_DEPRECATED void setEditorWidgetV2( int attrIdx, const QString& widgetType ) { mEditFormConfig->setWidgetType( attrIdx, widgetType ); }
13391359

@@ -1351,28 +1371,41 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
13511371
* @param config The config to set for this field
13521372
*
13531373
* @see setEditorWidgetV2() for a list of widgets and choose the widget to see the available options.
1374+
*
1375+
* @deprecated Use `editFormConfig()->setWidgetConfig()` instead
13541376
*/
13551377
Q_DECL_DEPRECATED void setEditorWidgetV2Config( int attrIdx, const QgsEditorWidgetConfig& config ) { mEditFormConfig->setWidgetConfig( attrIdx, config ); }
13561378

13571379
/**
13581380
* Set string representing 'true' for a checkbox
13591381
*
1360-
* @deprecated Use setEditorWidgetV2Config() instead
1382+
* @deprecated Use @deprecated Use `editFormConfig()->setWidgetConfig()` instead
13611383
*/
13621384
Q_DECL_DEPRECATED void setCheckedState( int idx, const QString& checked, const QString& notChecked );
13631385

1364-
/** Get edit form */
1386+
/**
1387+
* Get edit form
1388+
*
1389+
* @deprecated Use `editFormConfig()->uiForm()` instead
1390+
*/
13651391
Q_DECL_DEPRECATED QString editForm() const { return mEditFormConfig->uiForm(); }
13661392

1367-
/** Set edit form */
1393+
/**
1394+
* Set edit form
1395+
* @deprecated Use `editFormConfig()->setUiForm()` instead
1396+
*/
13681397
Q_DECL_DEPRECATED void setEditForm( const QString& ui ) { mEditFormConfig->setUiForm( ui ); }
13691398

13701399
/** 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+
*/
13721403
Q_DECL_DEPRECATED QgsVectorLayer::FeatureFormSuppress featureFormSuppress() const { return ( FeatureFormSuppress )mEditFormConfig->suppress(); }
13731404

13741405
/** 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+
*/
13761409
Q_DECL_DEPRECATED void setFeatureFormSuppress( QgsVectorLayer::FeatureFormSuppress s ) { mEditFormConfig->setSuppress(( QgsEditFormConfig::FeatureFormSuppress )s ); }
13771410

13781411
/** Get annotation form */
@@ -1381,22 +1414,30 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
13811414
/** Set annotation form for layer */
13821415
void setAnnotationForm( const QString& ui );
13831416

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+
*/
13851422
Q_DECL_DEPRECATED QString editFormInit() const { return mEditFormConfig->initFunction(); }
13861423

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+
*/
13881429
Q_DECL_DEPRECATED void setEditFormInit( const QString& function ) { mEditFormConfig->setInitFunction( function ); }
13891430

13901431
/**
13911432
* Access value map
1392-
* @deprecated Use editorWidgetV2Config() instead
1433+
* @deprecated Use `editFormConfig()->widgetConfig()` instead
13931434
*/
13941435
Q_DECL_DEPRECATED QMap<QString, QVariant> valueMap( int idx );
13951436

13961437
/**
13971438
* Access range widget config data
13981439
*
1399-
* @deprecated Use editorWidgetV2Config() instead
1440+
* @deprecated Use `editFormConfig()->widgetConfig()` instead
14001441
*/
14011442
Q_DECL_DEPRECATED RangeData range( int idx );
14021443

@@ -1414,27 +1455,40 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
14141455
/**
14151456
* Access date format
14161457
*
1417-
* @deprecated Use setEditorWidgetV2Config() instead
1458+
* @deprecated Use `editFormConfig()->widgetConfig()` instead
14181459
*/
14191460
Q_DECL_DEPRECATED QString dateFormat( int idx );
14201461

14211462
/**
14221463
* Access widget size for photo and webview widget
14231464
*
1424-
* @deprecated Use setEditorWidgetV2Config() instead
1465+
* @deprecated Use `editFormConfig()->widgetConfig()` instead
14251466
*/
14261467
Q_DECL_DEPRECATED QSize widgetSize( int idx );
14271468

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 ); }
14301475

1431-
/** Label widget on top **/
1476+
/**
1477+
* Label widget on top
1478+
* @deprecated Use `editFormConfig()->labelOnTop()` instead
1479+
*/
14321480
Q_DECL_DEPRECATED bool labelOnTop( int idx ) { return mEditFormConfig->labelOnTop( idx ); }
14331481

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 ); }
14361487

1437-
/** Label widget on top **/
1488+
/**
1489+
* Label widget on top
1490+
* @deprecated Use `editFormConfig()->setLabelOnTop()` instead
1491+
*/
14381492
Q_DECL_DEPRECATED void setLabelOnTop( int idx, bool onTop ) { mEditFormConfig->setLabelOnTop( idx, onTop ); }
14391493

14401494
//! Buffer with uncommitted editing operations. Only valid after editing has been turned on.

0 commit comments

Comments
 (0)
Please sign in to comment.