16#ifndef QGSDEFAULTVALUE_H
17#define QGSDEFAULTVALUE_H
64 SIP_PYOBJECT __repr__();
66 const QString str = sipCpp->isValid() ? QStringLiteral(
"<QgsDefaultValue: %1>" ).arg(
67 sipCpp->expression().length() > 1000 ? sipCpp->expression().left( 1000 ) + QStringLiteral(
"..." )
68 : sipCpp->expression() )
69 : QStringLiteral(
"<QgsDefaultValue: invalid>" );
70 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
112 bool mApplyOnUpdate = false;
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.
void setExpression(const QString &expression)
The expression will be evaluated whenever a default value needs to be calculated for a field.
#define SIP_PYTHON_SPECIAL_BOOL(method_or_code)
Q_DECLARE_METATYPE(QgsDatabaseQueryLogEntry)