16 #ifndef QGSFIELDEXPRESSIONWIDGET_H 17 #define QGSFIELDEXPRESSIONWIDGET_H 19 #include <QSharedPointer> 21 #include <QToolButton> 43 Q_PROPERTY(
QString expressionDialogTitle READ expressionDialogTitle WRITE setExpressionDialogTitle )
44 Q_FLAGS( QgsFieldProxyModel::Filters )
54 void setExpressionDialogTitle( const
QString& title );
57 const
QString expressionDialogTitle() {
return mExpressionDialogTitle; }
60 void setFilters(
const QgsFieldProxyModel::Filters& filters );
62 void setLeftHandButtonStyle(
bool isLeft );
65 QgsFieldProxyModel::Filters
filters()
const {
return mFieldProxyModel->filters(); }
75 QString currentField(
bool *isExpression =
nullptr,
bool *isValid =
nullptr )
const;
80 bool isValidExpression(
QString *expressionError =
nullptr )
const;
85 bool isExpression()
const;
124 void registerGetExpressionContextCallback( ExpressionContextCallback fnGetExpressionContext,
const void* context );
128 void fieldChanged(
const QString& fieldName );
131 void fieldChanged(
const QString& fieldName,
bool isValid );
143 void setRow(
int row ) { mCombo->setCurrentIndex( row ); }
146 void setField(
const QString &fieldName );
154 void setExpression(
const QString& expression );
158 void editExpression();
161 void expressionEdited(
const QString& expression );
164 void expressionEditingFinished();
166 void currentFieldChanged();
173 void updateLineEditStyle(
const QString& expression =
QString() );
175 bool isExpressionValid(
const QString& expressionStr );
183 void beforeResetModel();
184 void afterResetModel();
190 QString mExpressionDialogTitle;
193 ExpressionContextCallback mExpressionContextCallback;
194 const void* mExpressionContextCallbackContext;
197 friend class TestQgsFieldExpressionWidget;
200 #endif // QGSFIELDEXPRESSIONWIDGET_H
Base class for all map layer types.
The QgsFieldProxyModel class provides an easy to use model to display the list of fields of a layer...
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
General purpose distance and area calculator.
Represents a vector layer which manages a vector based data sets.