QGIS API Documentation
3.8.0-Zanzibar (11aff65)
|
Query Builder for layers. More...
#include <qgsquerybuilder.h>
Public Slots | |
void | accept () override |
void | clear () |
void | reject () override |
void | setDatasourceDescription (const QString &uri) |
void | test () |
Test the constructed sql statement to see if the vector layer data provider likes it. More... | |
Public Member Functions | |
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. More... | |
~QgsQueryBuilder () override | |
void | setSql (const QString &sqlStatement) |
void | showEvent (QShowEvent *event) override |
QString | sql () |
Query Builder for layers.
The query builder allows interactive creation of a SQL for limiting the features displayed in a vector layer. The fields in the table are displayed and sample values (or all values) can be viewed to aid in constructing the query. A test function returns the number of features that will be returned.
Definition at line 43 of file qgsquerybuilder.h.
QgsQueryBuilder::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.
layer | existing vector layer |
parent | Parent widget |
fl | dialog flags |
Definition at line 30 of file qgsquerybuilder.cpp.
|
override |
Definition at line 85 of file qgsquerybuilder.cpp.
|
overrideslot |
Definition at line 247 of file qgsquerybuilder.cpp.
|
slot |
Definition at line 411 of file qgsquerybuilder.cpp.
|
overrideslot |
Definition at line 274 of file qgsquerybuilder.cpp.
|
slot |
Definition at line 424 of file qgsquerybuilder.cpp.
void QgsQueryBuilder::setSql | ( | const QString & | sqlStatement | ) |
Definition at line 329 of file qgsquerybuilder.cpp.
|
override |
Definition at line 91 of file qgsquerybuilder.cpp.
QString QgsQueryBuilder::sql | ( | ) |
Definition at line 324 of file qgsquerybuilder.cpp.
|
slot |
Test the constructed sql statement to see if the vector layer data provider likes it.
The number of rows that would be returned is displayed in a message box. The test uses a "select count(*) from ..." query to test the SQL statement.
Definition at line 217 of file qgsquerybuilder.cpp.