Skip to content

Commit

Permalink
Update documentation and sip binding
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed May 18, 2017
1 parent 344b964 commit bb1738d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/core/qgsvectorlayer.sip
Original file line number Diff line number Diff line change
Expand Up @@ -1432,6 +1432,9 @@ Assembles mUpdatedFields considering provider fields, joined fields and added fi

QMap< QgsFieldConstraints::Constraint, QgsFieldConstraints::ConstraintStrength> fieldConstraintsAndStrength( int fieldIndex ) const;
%Docstring
Returns a map of constraint with their strength for a specific field of the layer.
\param fieldIndex field index
.. versionadded:: 3.0
:rtype: QMap< QgsFieldConstraints.Constraint, QgsFieldConstraints.ConstraintStrength>
%End

Expand Down
5 changes: 5 additions & 0 deletions src/core/qgsvectorlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -1347,6 +1347,11 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte
*/
QgsFieldConstraints::Constraints fieldConstraints( int fieldIndex ) const;

/**
* Returns a map of constraint with their strength for a specific field of the layer.
* \param fieldIndex field index
* \since QGIS 3.0
*/
QMap< QgsFieldConstraints::Constraint, QgsFieldConstraints::ConstraintStrength> fieldConstraintsAndStrength( int fieldIndex ) const;

/**
Expand Down

0 comments on commit bb1738d

Please sign in to comment.