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( QString title );
57 const QString expressionDialogTitle() {
return mExpressionDialogTitle; }
60 void setFilters( QgsFieldProxyModel::Filters filters );
62 void setLeftHandButtonStyle(
bool isLeft );
65 QgsFieldProxyModel::Filters
filters()
const {
return mFieldProxyModel->filters(); }
75 QString currentField(
bool *isExpression = 0,
bool *isValid = 0 )
const;
80 bool isValidExpression( QString *expressionError = 0 )
const;
82 bool isExpression()
const;
86 QString currentText()
const;
93 void fieldChanged( QString fieldName );
96 void fieldChanged( QString fieldName,
bool isValid );
108 void setField(
const QString &fieldName );
112 void editExpression();
115 void expressionEdited(
const QString expression );
118 void expressionEditingFinished();
120 void currentFieldChanged();
127 void updateLineEditStyle(
const QString expression = QString() );
129 bool isExpressionValid(
const QString expressionStr );
132 void changeEvent( QEvent* event )
override;
136 QToolButton* mButton;
138 QString mExpressionDialogTitle;
139 QSharedPointer<const QgsDistanceArea> mDa;
142 #endif // QGSFIELDEXPRESSIONWIDGET_H