19 : mExpression( expression )
20 , mApplyOnUpdate( applyOnUpdate )
27 return mExpression == other.mExpression
28 && mApplyOnUpdate == other.mApplyOnUpdate;
43 return mApplyOnUpdate;
53 return !mExpression.isEmpty();
56 QgsDefaultValue::operator bool()
const 58 return !mExpression.isEmpty();
void setExpression(const QString &expression)
The expression will be evaluated whenever a default value needs to be calculated for a field...
bool isValid() const
Returns if this default value should be applied.
The QgsDefaultValue class provides a container for managing client side default values for fields...
QgsDefaultValue(const QString &expression=QString(), bool applyOnUpdate=false)
Create a new default value with the given expression and applyOnUpdate flag.
bool operator==(const QgsDefaultValue &other) const
QString expression() const
The expression will be evaluated whenever a default value needs to be calculated for a field...
bool applyOnUpdate() const
The applyOnUpdate flag determines if this expression should also be applied when a feature is updated...
void setApplyOnUpdate(bool applyOnUpdate)
The applyOnUpdate flag determines if this expression should also be applied when a feature is updated...