16 #ifndef QGSEXPRESSIONBUILDER_H
17 #define QGSEXPRESSIONBUILDER_H
20 #include "ui_qgsexpressionbuilder.h"
25 #include "QStandardItemModel"
26 #include "QStandardItem"
27 #include "QSortFilterProxyModel"
40 if ( source_parent == qobject_cast<QStandardItemModel*>( sourceModel() )->invisibleRootItem()->
index() )
60 QString expressionText,
63 : QStandardItem( label )
65 mExpressionText = expressionText;
71 QString expressionText,
73 : QStandardItem( label )
75 mExpressionText = expressionText;
90 void setHelpText( QString helpText ) { mHelpText = helpText; }
99 QString mExpressionText;
122 void loadFieldNames();
124 void loadFieldNames(
const QgsFields& fields );
132 QString expressionText();
135 void setExpressionText(
const QString& expression );
144 void registerItem( QString group, QString label, QString expressionText,
145 QString helpText =
"",
148 bool isExpressionValid();
150 void saveToRecent( QString key );
152 void loadRecent( QString key );
155 void currentChanged(
const QModelIndex &
index,
const QModelIndex & );
156 void on_expressionTree_doubleClicked(
const QModelIndex &index );
157 void on_txtExpressionString_textChanged();
158 void on_txtSearchEdit_textChanged();
159 void on_lblPreview_linkActivated( QString link );
160 void on_mValueListWidget_itemDoubleClicked( QListWidgetItem* item );
161 void operatorButtonClicked();
162 void showContextMenu(
const QPoint & );
163 void loadSampleValues();
164 void loadAllValues();
167 void setExpressionState(
bool state );
175 void expressionParsed(
bool isValid );
178 void fillFieldValues(
int fieldIndex,
int countLimit );
182 QStandardItemModel *mModel;
184 QMap<QString, QgsExpressionItem*> mExpressionGroups;
187 bool mExpressionValid;
191 #endif // QGSEXPRESSIONBUILDER_H