18#include "moc_qgsdefaultvalue.cpp"
27 return mExpression == other.mExpression && mApplyOnUpdate == other.mApplyOnUpdate;
42 return mApplyOnUpdate;
52 return !mExpression.isEmpty();
55QgsDefaultValue::operator bool()
const
57 return !mExpression.isEmpty();
QgsDefaultValue(const QString &expression=QString(), bool applyOnUpdate=false)
Create a new default value with the given expression and applyOnUpdate flag.
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.