64 void setCustomPreviewGenerator(
const QString &label,
const QList< QPair< QString, QVariant > > &choices,
const std::function<
QgsExpressionContext(
const QVariant & ) > &previewContextGenerator );
80 void setCustomPreviewGenerator(
const QString &label,
const QList< QPair< QString, QVariant > > &choices, SIP_PYCALLABLE );
83 Py_BEGIN_ALLOW_THREADS
88 PyObject *s = sipCallMethod( NULL, a2,
"D", &value, sipType_QVariant, NULL );
92 if ( sipIsError == 0 )
96 sipReleaseType( t1, sipType_QgsExpressionContext, state );
106 void setExpressionText(
const QString &expression );
129 bool evalError()
const;
135 bool parserError()
const;
141 QList<QgsExpression::ParserError>
parserErrors()
const {
return mExpression.parserErrors();}
148 QString currentPreviewText()
const;
177 void setCurrentFeature(
const QgsFeature &feature );
181 void linkActivated(
const QString & );
182 void setEvalError(
bool evalError );
183 void setParserError(
bool parserError );
184 void copyFullExpressionValue();
185 void setCustomChoice(
int );
188 void setExpressionToolTip(
const QString &toolTip );
189 void refreshPreview();
194 bool mUseGeomCalculator =
false;
196 bool mEvalError =
true;
197 bool mParserError =
true;
198 QString mExpressionText;
200 QAction *mCopyPreviewAction =
nullptr;
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...