16 #ifndef QGSDEFAULTVALUE_H
17 #define QGSDEFAULTVALUE_H
19 #include "qgis_core.h"
52 Q_PROPERTY( QString expression READ expression WRITE setExpression )
53 Q_PROPERTY(
bool applyOnUpdate READ applyOnUpdate WRITE setApplyOnUpdate )
61 explicit QgsDefaultValue(
const QString &expression = QString(),
bool applyOnUpdate =
false );
67 SIP_PYOBJECT __repr__();
69 const QString
str = sipCpp->isValid() ? QStringLiteral(
"<QgsDefaultValue: %1>" ).arg(
70 sipCpp->expression().length() > 1000 ? sipCpp->expression().left( 1000 ) + QStringLiteral(
"..." )
71 : sipCpp->expression() )
72 : QStringLiteral(
"<QgsDefaultValue: invalid>" );
73 sipRes = PyUnicode_FromString(
str.toUtf8().constData() );
81 QString expression()
const;
87 void setExpression(
const QString &expression );
93 bool applyOnUpdate()
const;
99 void setApplyOnUpdate(
bool applyOnUpdate );
105 bool isValid()
const;
115 bool mApplyOnUpdate = false;
120 #endif // QGSDEFAULTVALUE_H