QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
|
SQL composer dialog. More...
#include <qgssqlcomposerdialog.h>
Classes | |
struct | Argument |
argument of a function More... | |
struct | Function |
description of server functions More... | |
class | SQLValidatorCallback |
Callback to do validation check on dialog validation. More... | |
class | TableSelectedCallback |
Callback to do actions on table selection. More... | |
Public Types | |
typedef QPair< QString, QString > | PairNameTitle |
pair (name, title) | |
typedef QPair< QString, QString > | PairNameType |
pair (name, type) | |
Public Member Functions | |
QgsSQLComposerDialog (QgsVectorLayer *layer, QWidget *parent=nullptr, Qt::WindowFlags fl=QgsGuiUtils::ModalDialogFlags) | |
This constructor is used on an existing layer. | |
QgsSQLComposerDialog (QWidget *parent=nullptr, Qt::WindowFlags fl=QgsGuiUtils::ModalDialogFlags) | |
constructor | |
~QgsSQLComposerDialog () override | |
void | addApis (const QStringList &list) |
add a list of API for autocompletion | |
void | addColumnNames (const QList< PairNameType > &list, const QString &tableName) |
add a list of column names | |
void | addColumnNames (const QStringList &list, const QString &tableName) |
add a list of column names | |
void | addFunctions (const QList< Function > &list) |
add a list of functions | |
void | addFunctions (const QStringList &list) |
add a list of functions | |
void | addOperators (const QStringList &list) |
add a list of operators | |
void | addSpatialPredicates (const QList< Function > &list) |
add a list of spatial predicates | |
void | addSpatialPredicates (const QStringList &list) |
add a list of spatial predicates | |
void | addTableNames (const QList< PairNameTitle > &listNameTitle) |
add a list of table names | |
void | addTableNames (const QStringList &list) |
add a list of table names | |
void | setSql (const QString &sql) |
initialize the SQL statement | |
void | setSQLValidatorCallback (SQLValidatorCallback *sqlValidatorCallback) |
Set a callback that will be called when the OK button is pushed. | |
void | setSubsetString (const QString &subsetString) override |
Sets a subset string into the dialog. | |
void | setSupportMultipleTables (bool bMultipleTables, const QString &mainTypename=QString()) |
Sets if multiple tables/joins are supported. Default is false . | |
void | setTableSelectedCallback (TableSelectedCallback *tableSelectedCallback) |
Set a callback that will be called when a new table is selected, so that new column names can be added typically. | |
QString | sql () const |
Gets the SQL statement. | |
QString | subsetString () const override |
Returns the subset string entered in the dialog. | |
Public Member Functions inherited from QgsSubsetStringEditorInterface | |
QgsSubsetStringEditorInterface (QWidget *parent=nullptr, Qt::WindowFlags fl=QgsGuiUtils::ModalDialogFlags) | |
Constructor. | |
Protected Member Functions | |
bool | eventFilter (QObject *obj, QEvent *event) override |
SQL composer dialog.
Definition at line 41 of file qgssqlcomposerdialog.h.
typedef QPair<QString, QString> QgsSQLComposerDialog::PairNameTitle |
pair (name, title)
Definition at line 48 of file qgssqlcomposerdialog.h.
typedef QPair<QString, QString> QgsSQLComposerDialog::PairNameType |
pair (name, type)
Definition at line 51 of file qgssqlcomposerdialog.h.
|
explicit |
constructor
Definition at line 31 of file qgssqlcomposerdialog.cpp.
QgsSQLComposerDialog::QgsSQLComposerDialog | ( | QgsVectorLayer * | layer, |
QWidget * | parent = nullptr , |
||
Qt::WindowFlags | fl = QgsGuiUtils::ModalDialogFlags |
||
) |
This constructor is used on an existing layer.
On successful accept, it will update the layer subset string.
layer | existing vector layer |
parent | Parent widget |
fl | dialog flags |
Definition at line 35 of file qgssqlcomposerdialog.cpp.
|
override |
Definition at line 127 of file qgssqlcomposerdialog.cpp.
void QgsSQLComposerDialog::addApis | ( | const QStringList & | list | ) |
add a list of API for autocompletion
Definition at line 765 of file qgssqlcomposerdialog.cpp.
void QgsSQLComposerDialog::addColumnNames | ( | const QList< PairNameType > & | list, |
const QString & | tableName | ||
) |
add a list of column names
Definition at line 406 of file qgssqlcomposerdialog.cpp.
void QgsSQLComposerDialog::addColumnNames | ( | const QStringList & | list, |
const QString & | tableName | ||
) |
add a list of column names
Definition at line 386 of file qgssqlcomposerdialog.cpp.
void QgsSQLComposerDialog::addFunctions | ( | const QList< Function > & | list | ) |
add a list of functions
Definition at line 547 of file qgssqlcomposerdialog.cpp.
void QgsSQLComposerDialog::addFunctions | ( | const QStringList & | list | ) |
add a list of functions
Definition at line 534 of file qgssqlcomposerdialog.cpp.
void QgsSQLComposerDialog::addOperators | ( | const QStringList & | list | ) |
add a list of operators
Definition at line 431 of file qgssqlcomposerdialog.cpp.
void QgsSQLComposerDialog::addSpatialPredicates | ( | const QList< Function > & | list | ) |
add a list of spatial predicates
Definition at line 524 of file qgssqlcomposerdialog.cpp.
void QgsSQLComposerDialog::addSpatialPredicates | ( | const QStringList & | list | ) |
add a list of spatial predicates
Definition at line 511 of file qgssqlcomposerdialog.cpp.
void QgsSQLComposerDialog::addTableNames | ( | const QList< PairNameTitle > & | listNameTitle | ) |
add a list of table names
Definition at line 363 of file qgssqlcomposerdialog.cpp.
void QgsSQLComposerDialog::addTableNames | ( | const QStringList & | list | ) |
add a list of table names
Definition at line 354 of file qgssqlcomposerdialog.cpp.
|
overrideprotected |
Definition at line 136 of file qgssqlcomposerdialog.cpp.
void QgsSQLComposerDialog::setSql | ( | const QString & | sql | ) |
initialize the SQL statement
Definition at line 203 of file qgssqlcomposerdialog.cpp.
void QgsSQLComposerDialog::setSQLValidatorCallback | ( | SQLValidatorCallback * | sqlValidatorCallback | ) |
Set a callback that will be called when the OK button is pushed.
Ownership of the callback remains to the caller.
Definition at line 198 of file qgssqlcomposerdialog.cpp.
|
inlineoverridevirtual |
Sets a subset string into the dialog.
Implements QgsSubsetStringEditorInterface.
Definition at line 133 of file qgssqlcomposerdialog.h.
void QgsSQLComposerDialog::setSupportMultipleTables | ( | bool | bMultipleTables, |
const QString & | mainTypename = QString() |
||
) |
Sets if multiple tables/joins are supported. Default is false
.
Definition at line 782 of file qgssqlcomposerdialog.cpp.
void QgsSQLComposerDialog::setTableSelectedCallback | ( | TableSelectedCallback * | tableSelectedCallback | ) |
Set a callback that will be called when a new table is selected, so that new column names can be added typically.
Ownership of the callback remains to the caller.
Definition at line 193 of file qgssqlcomposerdialog.cpp.
QString QgsSQLComposerDialog::sql | ( | ) | const |
Gets the SQL statement.
Definition at line 209 of file qgssqlcomposerdialog.cpp.
|
inlineoverridevirtual |
Returns the subset string entered in the dialog.
Implements QgsSubsetStringEditorInterface.
Definition at line 132 of file qgssqlcomposerdialog.h.