Skip to content

Commit

Permalink
QgsVectorLayer field configuration flag methods should also be exposed
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Oct 3, 2023
1 parent 524580f commit 15f04bb
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
22 changes: 22 additions & 0 deletions python/core/auto_generated/vector/qgsvectorlayer.sip.in
Expand Up @@ -2391,8 +2391,30 @@ can also be set. Setting an empty expression will clear any existing expression
.. versionadded:: 3.0
%End

void setFieldConfigurationFlags( int index, Qgis::FieldConfigurationFlags flags );
%Docstring
Sets the configuration flags of the field at given index

.. seealso:: :py:func:`QgsField.configurationFlags`

.. versionadded:: 3.16
%End

void setFieldConfigurationFlag( int index, Qgis::FieldConfigurationFlag flag, bool active );
%Docstring
Sets the given configuration ``flag`` for the field at given ``index`` to be ``active`` or not.

.. versionadded:: 3.16
%End

Qgis::FieldConfigurationFlags fieldConfigurationFlags( int index ) const;
%Docstring
Returns the configuration flags of the field at given index

.. seealso:: :py:func:`QgsField.setConfigurationFlags`

.. versionadded:: 3.16
%End

void setEditorWidgetSetup( int index, const QgsEditorWidgetSetup &setup );
%Docstring
Expand Down
6 changes: 3 additions & 3 deletions src/core/vector/qgsvectorlayer.h
Expand Up @@ -2245,20 +2245,20 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte
* \see QgsField::configurationFlags()
* \since QGIS 3.16
*/
void setFieldConfigurationFlags( int index, Qgis::FieldConfigurationFlags flags ) SIP_SKIP;
void setFieldConfigurationFlags( int index, Qgis::FieldConfigurationFlags flags );

/**
* Sets the given configuration \a flag for the field at given \a index to be \a active or not.
* \since QGIS 3.16
*/
void setFieldConfigurationFlag( int index, Qgis::FieldConfigurationFlag flag, bool active ) SIP_SKIP;
void setFieldConfigurationFlag( int index, Qgis::FieldConfigurationFlag flag, bool active );

/**
* Returns the configuration flags of the field at given index
* \see QgsField::setConfigurationFlags()
* \since QGIS 3.16
*/
Qgis::FieldConfigurationFlags fieldConfigurationFlags( int index ) const SIP_SKIP;
Qgis::FieldConfigurationFlags fieldConfigurationFlags( int index ) const;

/**
* \copydoc editorWidgetSetup
Expand Down

0 comments on commit 15f04bb

Please sign in to comment.