Skip to content
Permalink
Browse files

[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
  • Loading branch information
m-kuhn committed Sep 29, 2017
1 parent e0cdb18 commit 08cb2d78d3be51e951e40f1bee80dc6209c34f64
Showing with 2 additions and 0 deletions.
  1. +1 −0 python/core/qgsdefaultvalue.sip
  2. +1 −0 src/core/qgsdefaultvalue.h
@@ -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;

@@ -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;

0 comments on commit 08cb2d7

Please sign in to comment.
You can’t perform that action at this time.