15#ifndef QGSQUERYBUILDER_H
16#define QGSQUERYBUILDER_H
17#include "ui_qgsquerybuilderbase.h"
28#include <QSortFilterProxyModel>
29#include <QStandardItem>
30#include <QStandardItemModel>
61 void showEvent( QShowEvent *event )
override;
67 void setSql(
const QString &sqlStatement );
89 codeEditorWidget()
const;
104 static bool saveQueryToFile(
const QString &subset );
110 static bool loadQueryFromFile( QString &subset );
113 void accept()
override;
114 void reject()
override;
138 void setDatasourceDescription(
const QString &uri );
141 void btnEqual_clicked();
142 void btnLessThan_clicked();
143 void btnGreaterThan_clicked();
144 void btnPct_clicked();
145 void btnIn_clicked();
146 void btnNotIn_clicked();
147 void btnLike_clicked();
148 void btnILike_clicked();
149 void lstFields_clicked(
const QModelIndex &index );
150 void lstFields_doubleClicked(
const QModelIndex &index );
151 void lstValues_doubleClicked(
const QModelIndex &index );
152 void btnLessEqual_clicked();
153 void btnGreaterEqual_clicked();
154 void btnNotEqual_clicked();
155 void btnAnd_clicked();
156 void btnNot_clicked();
157 void btnOr_clicked();
158 void onTextChanged(
const QString &text );
159 void layerSubsetStringChanged();
165 void btnGetAllValues_clicked();
172 void btnSampleValues_clicked();
180 void setupGuiViews();
181 void fillValues(
const QString &field,
int limit );
187 QStandardItemModel *mModelValues =
nullptr;
189 QSortFilterProxyModel *mProxyValues =
nullptr;
191 int mPreviousFieldRow = -1;
197 QString mOrigSubsetString;
200 bool mIgnoreLayerSubsetStringChangedSignal =
false;
A text editor based on QScintilla2.
A proxy model to filter the list of fields of a layer.
friend class TestQgsQueryBuilder
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.
void setSql(const QString &sqlStatement)
Set the sql statement to display in the dialog.
void showEvent(QShowEvent *event) override
QgsQueryBuilder(QgsVectorLayer *layer, QWidget *parent=nullptr, Qt::WindowFlags fl=QgsGuiUtils::ModalDialogFlags)
This constructor is used when the query builder is called from the vector layer properties dialog.
QString sql() const
Returns the sql statement entered in the dialog.
QgsCodeEditor * codeEditorWidget() const
Returns the code editor widget for the SQL.
QgsSubsetStringEditorInterface(QWidget *parent=nullptr, Qt::WindowFlags fl=QgsGuiUtils::ModalDialogFlags)
Constructor.
Represents a vector layer which manages a vector based dataset.
#define SIP_IF_FEATURE(feature)