[FEATURE] Default values on update

Add an option to add default values on update of attributes or geometry.
This can be seen as a "derived value" that will be saved to the database
(like area of a polygon) or as a means to track last_modified dates etc.

See #5218
This commit is contained in:
Matthias Kuhn 2017-09-29 17:55:02 +02:00
parent e0cdb18ec1
commit 08cb2d78d3
No known key found for this signature in database
GPG Key ID: A0E766808764D73F
2 changed files with 2 additions and 0 deletions

View File

@ -41,6 +41,7 @@ class QgsDefaultValue
QgsDefaultValue( const QString &expression = QString(), bool applyOnUpdate = false );
%Docstring
Create a new default value with the given ``expression`` and ``applyOnUpdate`` flag.
.. seealso:: QgsVectorLayer.setDefaultValueDefinition
%End
bool operator==( const QgsDefaultValue &other ) const;

View File

@ -55,6 +55,7 @@ class CORE_EXPORT QgsDefaultValue
/**
* Create a new default value with the given \a expression and \a applyOnUpdate flag.
* \see QgsVectorLayer::setDefaultValueDefinition
*/
QgsDefaultValue( const QString &expression = QString(), bool applyOnUpdate = false );
bool operator==( const QgsDefaultValue &other ) const;