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();
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.
Q_GADGET QString expression
void setApplyOnUpdate(bool applyOnUpdate)
The applyOnUpdate flag determines if this expression should also be applied when a feature is updated...
bool isValid() const
Returns if this default value should be applied.
bool operator==(const QgsDefaultValue &other) const
void setExpression(const QString &expression)
The expression will be evaluated whenever a default value needs to be calculated for a field.