Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[FEATURE] Client side default field values
Allows an expression to be set for a vector layer field which is used to evaluate a default value for this field. A new method, QgsVectorLayer::defaultValue( int index, const QgsFeature& feature = QgsFeature(), QgsExpressionContext* context = nullptr ) has been added which evaluates the default value for a given field using the optionally passed feature and expression context. This allows default values to utilise properties of the feature which exist at the time of calling, such as digitized geometries. The expression context parameter allows variables to be used in default value expressions, making it easier to eg insert a user's name, current datetime, project path, etc Default values are set using QgsVectorLayer::setDefaultValueExpression() and retrieved using defaultValueExpression() Sponsored by DB Fahrwegdienste GmbH
- Loading branch information
1 parent
9c62eec
commit 6ed2cf2
Showing
5 changed files
with
276 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters