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"
57 Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
59 void showEvent( QShowEvent *event )
override;
65 void setSql(
const QString &sqlStatement );
68 void setSubsetString(
const QString &subsetString )
override { setSql( subsetString ); }
85 QWidget *codeEditorWidget()
const;
97 void accept()
override;
98 void reject()
override;
122 void setDatasourceDescription(
const QString &uri );
125 void btnEqual_clicked();
126 void btnLessThan_clicked();
127 void btnGreaterThan_clicked();
128 void btnPct_clicked();
129 void btnIn_clicked();
130 void btnNotIn_clicked();
131 void btnLike_clicked();
132 void btnILike_clicked();
133 void lstFields_clicked(
const QModelIndex &index );
134 void lstFields_doubleClicked(
const QModelIndex &index );
135 void lstValues_doubleClicked(
const QModelIndex &index );
136 void btnLessEqual_clicked();
137 void btnGreaterEqual_clicked();
138 void btnNotEqual_clicked();
139 void btnAnd_clicked();
140 void btnNot_clicked();
141 void btnOr_clicked();
142 void onTextChanged(
const QString &text );
143 void layerSubsetStringChanged();
149 void btnGetAllValues_clicked();
156 void btnSampleValues_clicked();
163 void populateFields();
170 void setupGuiViews();
171 void setupLstFieldsModel();
172 void fillValues(
int idx,
int limit );
176 QStandardItemModel *mModelFields =
nullptr;
178 QStandardItemModel *mModelValues =
nullptr;
180 QSortFilterProxyModel *mProxyValues =
nullptr;
182 int mPreviousFieldRow;
188 QString mOrigSubsetString;
191 bool mIgnoreLayerSubsetStringChangedSignal =
false;
193 friend class TestQgsQueryBuilder;
A text editor based on QScintilla2.
Query Builder for layers.
QString subsetString() const override
Returns the subset string entered in the dialog.
void setSubsetString(const QString &subsetString) override
Sets a subset string into the dialog.
QgsCodeEditor * codeEditorWidget() const
Returns the code editor widget for the SQL.
Interface for a dialog that can edit subset strings.
Represents a vector layer which manages a vector based data sets.
#define SIP_IF_FEATURE(feature)