31 builder->setExpressionContext( context );
32 builder->setLayer( layer );
33 builder->setExpressionText( startText );
34 builder->expressionTree()->loadRecent( mRecentKey );
35 builder->expressionTree()->loadUserExpressions( );
37 connect( buttonBox, &QDialogButtonBox::helpRequested,
this, &QgsExpressionBuilderDialog::showHelp );
47 builder->setExpressionText( text );
52 return builder->expressionText();
57 return builder->expectedOutputFormat();
62 builder->setExpectedOutputFormat( expected );
67 return builder->expressionContext();
72 builder->setExpressionContext( context );
82 builder->expressionTree()->saveToRecent( builder->expressionText(), mRecentKey );
89 builder->setGeomCalculator( da );
94 return mAllowEvalErrors;
103 syncOkButtonEnabledState();
107 void QgsExpressionBuilderDialog::showHelp()
112 void QgsExpressionBuilderDialog::syncOkButtonEnabledState()
114 QPushButton *okButton = buttonBox->button( QDialogButtonBox::Ok );
116 if ( builder->parserError() )
117 okButton->setEnabled(
false );
118 else if ( !builder->evalError() || mAllowEvalErrors )
119 okButton->setEnabled(
true );
121 okButton->setEnabled(
true );