QGIS API Documentation  3.10.0-A Coruña (6c816b4204)
Classes | Public Types | Public Member Functions | Protected Member Functions | List of all members
QgsSQLComposerDialog Class Reference

SQL composer dialog. More...

#include <qgssqlcomposerdialog.h>

Inheritance diagram for QgsSQLComposerDialog:
Inheritance graph
[legend]

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) More...
 
typedef QPair< QString, QString > PairNameType
 pair (name, type) More...
 

Public Member Functions

 QgsSQLComposerDialog (QWidget *parent=nullptr, Qt::WindowFlags fl=QgsGuiUtils::ModalDialogFlags)
 constructor More...
 
 ~QgsSQLComposerDialog () override
 
void addApis (const QStringList &list)
 add a list of API for autocompletion More...
 
void addColumnNames (const QStringList &list, const QString &tableName)
 add a list of column names More...
 
void addColumnNames (const QList< PairNameType > &list, const QString &tableName)
 add a list of column names More...
 
void addFunctions (const QStringList &list)
 add a list of functions More...
 
void addFunctions (const QList< Function > &list)
 add a list of functions More...
 
void addOperators (const QStringList &list)
 add a list of operators More...
 
void addSpatialPredicates (const QStringList &list)
 add a list of spatial predicates More...
 
void addSpatialPredicates (const QList< Function > &list)
 add a list of spatial predicates More...
 
void addTableNames (const QStringList &list)
 add a list of table names More...
 
void addTableNames (const QList< PairNameTitle > &listNameTitle)
 add a list of table names More...
 
void setSql (const QString &sql)
 initialize the SQL statement More...
 
void setSQLValidatorCallback (SQLValidatorCallback *sqlValidatorCallback)
 Set a callback that will be called when the OK button is pushed. More...
 
void setSupportMultipleTables (bool bMultipleTables, const QString &mainTypename=QString())
 Sets if multiple tables/joins are supported. Default is false. More...
 
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. More...
 
QString sql () const
 Gets the SQL statement. More...
 

Protected Member Functions

bool eventFilter (QObject *obj, QEvent *event) override
 

Detailed Description

SQL composer dialog.

Note
not available in Python bindings

Definition at line 38 of file qgssqlcomposerdialog.h.

Member Typedef Documentation

◆ PairNameTitle

typedef QPair<QString, QString> QgsSQLComposerDialog::PairNameTitle

pair (name, title)

Definition at line 45 of file qgssqlcomposerdialog.h.

◆ PairNameType

typedef QPair<QString, QString> QgsSQLComposerDialog::PairNameType

pair (name, type)

Definition at line 48 of file qgssqlcomposerdialog.h.

Constructor & Destructor Documentation

◆ QgsSQLComposerDialog()

QgsSQLComposerDialog::QgsSQLComposerDialog ( QWidget *  parent = nullptr,
Qt::WindowFlags  fl = QgsGuiUtils::ModalDialogFlags 
)
explicit

constructor

Definition at line 30 of file qgssqlcomposerdialog.cpp.

◆ ~QgsSQLComposerDialog()

QgsSQLComposerDialog::~QgsSQLComposerDialog ( )
override

Definition at line 120 of file qgssqlcomposerdialog.cpp.

Member Function Documentation

◆ addApis()

void QgsSQLComposerDialog::addApis ( const QStringList &  list)

add a list of API for autocompletion

Definition at line 762 of file qgssqlcomposerdialog.cpp.

◆ addColumnNames() [1/2]

void QgsSQLComposerDialog::addColumnNames ( const QStringList &  list,
const QString &  tableName 
)

add a list of column names

Definition at line 375 of file qgssqlcomposerdialog.cpp.

◆ addColumnNames() [2/2]

void QgsSQLComposerDialog::addColumnNames ( const QList< PairNameType > &  list,
const QString &  tableName 
)

add a list of column names

Definition at line 395 of file qgssqlcomposerdialog.cpp.

◆ addFunctions() [1/2]

void QgsSQLComposerDialog::addFunctions ( const QStringList &  list)

add a list of functions

Definition at line 531 of file qgssqlcomposerdialog.cpp.

◆ addFunctions() [2/2]

void QgsSQLComposerDialog::addFunctions ( const QList< Function > &  list)

add a list of functions

Definition at line 544 of file qgssqlcomposerdialog.cpp.

◆ addOperators()

void QgsSQLComposerDialog::addOperators ( const QStringList &  list)

add a list of operators

Definition at line 420 of file qgssqlcomposerdialog.cpp.

◆ addSpatialPredicates() [1/2]

void QgsSQLComposerDialog::addSpatialPredicates ( const QStringList &  list)

add a list of spatial predicates

Definition at line 508 of file qgssqlcomposerdialog.cpp.

◆ addSpatialPredicates() [2/2]

void QgsSQLComposerDialog::addSpatialPredicates ( const QList< Function > &  list)

add a list of spatial predicates

Definition at line 521 of file qgssqlcomposerdialog.cpp.

◆ addTableNames() [1/2]

void QgsSQLComposerDialog::addTableNames ( const QStringList &  list)

add a list of table names

Definition at line 343 of file qgssqlcomposerdialog.cpp.

◆ addTableNames() [2/2]

void QgsSQLComposerDialog::addTableNames ( const QList< PairNameTitle > &  listNameTitle)

add a list of table names

Definition at line 352 of file qgssqlcomposerdialog.cpp.

◆ eventFilter()

bool QgsSQLComposerDialog::eventFilter ( QObject *  obj,
QEvent *  event 
)
overrideprotected

Definition at line 129 of file qgssqlcomposerdialog.cpp.

◆ setSql()

void QgsSQLComposerDialog::setSql ( const QString &  sql)

initialize the SQL statement

Definition at line 196 of file qgssqlcomposerdialog.cpp.

◆ setSQLValidatorCallback()

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 191 of file qgssqlcomposerdialog.cpp.

◆ setSupportMultipleTables()

void QgsSQLComposerDialog::setSupportMultipleTables ( bool  bMultipleTables,
const QString &  mainTypename = QString() 
)

Sets if multiple tables/joins are supported. Default is false.

Definition at line 779 of file qgssqlcomposerdialog.cpp.

◆ setTableSelectedCallback()

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 186 of file qgssqlcomposerdialog.cpp.

◆ sql()

QString QgsSQLComposerDialog::sql ( ) const

Gets the SQL statement.

Definition at line 202 of file qgssqlcomposerdialog.cpp.


The documentation for this class was generated from the following files: