15 #ifndef QGSQUERYBUILDER_H
16 #define QGSQUERYBUILDER_H
20 #include <QStandardItemModel>
21 #include <QSortFilterProxyModel>
22 #include <QStandardItem>
23 #include <QModelIndex>
24 #include "ui_qgsquerybuilderbase.h"
42 class GUI_EXPORT
QgsQueryBuilder :
public QDialog,
private Ui::QgsQueryBuilderBase
55 Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
57 void showEvent( QShowEvent *event )
override;
60 void setSql(
const QString &sqlStatement );
63 void accept()
override;
64 void reject()
override;
87 void setDatasourceDescription(
const QString &uri );
90 void btnEqual_clicked();
91 void btnLessThan_clicked();
92 void btnGreaterThan_clicked();
93 void btnPct_clicked();
95 void btnNotIn_clicked();
96 void btnLike_clicked();
97 void btnILike_clicked();
98 void lstFields_clicked(
const QModelIndex &index );
99 void lstFields_doubleClicked(
const QModelIndex &index );
100 void lstValues_doubleClicked(
const QModelIndex &index );
101 void btnLessEqual_clicked();
102 void btnGreaterEqual_clicked();
103 void btnNotEqual_clicked();
104 void btnAnd_clicked();
105 void btnNot_clicked();
106 void btnOr_clicked();
107 void onTextChanged(
const QString &text );
113 void btnGetAllValues_clicked();
120 void btnSampleValues_clicked();
127 void populateFields();
134 void setupGuiViews();
135 void setupLstFieldsModel();
136 void fillValues(
int idx,
int limit );
140 QStandardItemModel *mModelFields =
nullptr;
142 QStandardItemModel *mModelValues =
nullptr;
144 QSortFilterProxyModel *mProxyValues =
nullptr;
146 int mPreviousFieldRow;
152 QString mOrigSubsetString;
154 #endif //QGSQUERYBUILDER_H