@@ -72,7 +72,7 @@ QgsAttributeTypeDialog::QgsAttributeTypeDialog( QgsVectorLayer *vl, int fieldIdx
72
72
QSettings settings;
73
73
restoreGeometry ( settings.value ( " /Windows/QgsAttributeTypeDialog/geometry" ).toByteArray () );
74
74
75
- constraintExpression ->setLayer ( vl );
75
+ constraintExpressionWidget ->setLayer ( vl );
76
76
}
77
77
78
78
QgsAttributeTypeDialog::~QgsAttributeTypeDialog ()
@@ -180,29 +180,39 @@ bool QgsAttributeTypeDialog::labelOnTop() const
180
180
return labelOnTopCheckBox->isChecked ();
181
181
}
182
182
183
- void QgsAttributeTypeDialog::setExpressionDescription ( const QString &desc )
183
+ void QgsAttributeTypeDialog::setConstraintExpressionDescription ( const QString &desc )
184
184
{
185
- constraintExpressionDescription ->setText ( desc );
185
+ leConstraintExpressionDescription ->setText ( desc );
186
186
}
187
187
188
- QString QgsAttributeTypeDialog::expressionDescription ()
188
+ QString QgsAttributeTypeDialog::constraintExpressionDescription ()
189
189
{
190
- return constraintExpressionDescription ->text ();
190
+ return leConstraintExpressionDescription ->text ();
191
191
}
192
192
193
193
bool QgsAttributeTypeDialog::notNull () const
194
194
{
195
195
return notNullCheckBox->isChecked ();
196
196
}
197
197
198
- void QgsAttributeTypeDialog::setExpression ( const QString &str )
198
+ void QgsAttributeTypeDialog::setConstraintExpression ( const QString &str )
199
199
{
200
- constraintExpression ->setField ( str );
200
+ constraintExpressionWidget ->setField ( str );
201
201
}
202
202
203
- QString QgsAttributeTypeDialog::expression () const
203
+ QString QgsAttributeTypeDialog::defaultValueExpression () const
204
204
{
205
- return constraintExpression->asExpression ();
205
+ return mExpressionWidget ->expression ();
206
+ }
207
+
208
+ void QgsAttributeTypeDialog::setDefaultValueExpression ( const QString& expression )
209
+ {
210
+ mExpressionWidget ->setExpression ( expression );
211
+ }
212
+
213
+ QString QgsAttributeTypeDialog::constraintExpression () const
214
+ {
215
+ return constraintExpressionWidget->asExpression ();
206
216
}
207
217
208
218
void QgsAttributeTypeDialog::setFieldEditable ( bool editable )
0 commit comments