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;
75 void setDatasourceDescription(
const QString &uri );
78 void btnEqual_clicked();
79 void btnLessThan_clicked();
80 void btnGreaterThan_clicked();
81 void btnPct_clicked();
83 void btnNotIn_clicked();
84 void btnLike_clicked();
85 void btnILike_clicked();
86 void lstFields_clicked(
const QModelIndex &index );
87 void lstFields_doubleClicked(
const QModelIndex &index );
88 void lstValues_doubleClicked(
const QModelIndex &index );
89 void btnLessEqual_clicked();
90 void btnGreaterEqual_clicked();
91 void btnNotEqual_clicked();
92 void btnAnd_clicked();
93 void btnNot_clicked();
95 void onTextChanged(
const QString &text );
101 void btnGetAllValues_clicked();
108 void btnSampleValues_clicked();
115 void populateFields();
122 void setupGuiViews();
123 void setupLstFieldsModel();
124 void fillValues(
int idx,
int limit );
128 QStandardItemModel *mModelFields =
nullptr;
130 QStandardItemModel *mModelValues =
nullptr;
132 QSortFilterProxyModel *mProxyValues =
nullptr;
134 int mPreviousFieldRow;
140 QString mOrigSubsetString;
142 #endif //QGSQUERYBUILDER_H