QGIS API Documentation 4.3.0-Master (91d4a333d5d)
Loading...
Searching...
No Matches
QgsDbImportVectorLayerDialog Class Reference

A generic dialog for customising vector layer import options for database connections. More...

#include <qgsdbimportvectorlayerdialog.h>

Inheritance diagram for QgsDbImportVectorLayerDialog:

Public Member Functions

 QgsDbImportVectorLayerDialog (QgsAbstractDatabaseProviderConnection *connection, QWidget *parent=nullptr)
 Constructor for QgsDbImportVectorLayerDialog.
 ~QgsDbImportVectorLayerDialog () override
std::unique_ptr< QgsVectorLayerExporterTask > createExporterTask (const QVariantMap &extraProviderOptions=QVariantMap())
 Creates a new exporter task to match the settings defined in the dialog.
QgsExpressionContext createExpressionContext () const override
 This method needs to be reimplemented in all classes which implement this interface and return an expression context.
QString geometryColumn () const
 Returns the geometry column name for the destination table.
bool saveStyleToDatabase () const
 Returns true if the style should be saved to the database after import.
QString schema () const
 Returns the destination schema.
void setDestinationSchema (const QString &schema)
 Sets the destination schema for the new table.
void setMapCanvas (QgsMapCanvas *canvas)
 Sets a map canvas to associate with the dialog.
void setSourceUri (const QgsMimeDataUtils::Uri &uri)
 Sets the source table uri.
QgsVectorLayer * sourceLayer () const
 Returns the source layer, or nullptr if no source layer is set.
QString tableComment () const
 Returns the optional comment to use for the new table.
QString tableName () const
 Returns the destination table name.
Public Member Functions inherited from QgsExpressionContextGenerator
virtual ~QgsExpressionContextGenerator ()=default

Detailed Description

A generic dialog for customising vector layer import options for database connections.

Note
Not available in Python bindings
Since
QGIS 3.44

Definition at line 44 of file qgsdbimportvectorlayerdialog.h.

Constructor & Destructor Documentation

◆ QgsDbImportVectorLayerDialog()

QgsDbImportVectorLayerDialog::QgsDbImportVectorLayerDialog ( QgsAbstractDatabaseProviderConnection * connection,
QWidget * parent = nullptr )

Constructor for QgsDbImportVectorLayerDialog.

Ownership of connection is transferred to the dialog.

Definition at line 37 of file qgsdbimportvectorlayerdialog.cpp.

◆ ~QgsDbImportVectorLayerDialog()

QgsDbImportVectorLayerDialog::~QgsDbImportVectorLayerDialog ( )
override

Definition at line 158 of file qgsdbimportvectorlayerdialog.cpp.

Member Function Documentation

◆ createExporterTask()

std::unique_ptr< QgsVectorLayerExporterTask > QgsDbImportVectorLayerDialog::createExporterTask ( const QVariantMap & extraProviderOptions = QVariantMap())

Creates a new exporter task to match the settings defined in the dialog.

Definition at line 347 of file qgsdbimportvectorlayerdialog.cpp.

◆ createExpressionContext()

QgsExpressionContext QgsDbImportVectorLayerDialog::createExpressionContext ( ) const
overridevirtual

This method needs to be reimplemented in all classes which implement this interface and return an expression context.

Implements QgsExpressionContextGenerator.

Definition at line 426 of file qgsdbimportvectorlayerdialog.cpp.

◆ geometryColumn()

QString QgsDbImportVectorLayerDialog::geometryColumn ( ) const

Returns the geometry column name for the destination table.

Definition at line 326 of file qgsdbimportvectorlayerdialog.cpp.

◆ saveStyleToDatabase()

bool QgsDbImportVectorLayerDialog::saveStyleToDatabase ( ) const

Returns true if the style should be saved to the database after import.

Definition at line 316 of file qgsdbimportvectorlayerdialog.cpp.

◆ schema()

QString QgsDbImportVectorLayerDialog::schema ( ) const

Returns the destination schema.

Definition at line 301 of file qgsdbimportvectorlayerdialog.cpp.

◆ setDestinationSchema()

void QgsDbImportVectorLayerDialog::setDestinationSchema ( const QString & schema)

Sets the destination schema for the new table.

Definition at line 170 of file qgsdbimportvectorlayerdialog.cpp.

◆ setMapCanvas()

void QgsDbImportVectorLayerDialog::setMapCanvas ( QgsMapCanvas * canvas)

Sets a map canvas to associate with the dialog.

Definition at line 331 of file qgsdbimportvectorlayerdialog.cpp.

◆ setSourceUri()

void QgsDbImportVectorLayerDialog::setSourceUri ( const QgsMimeDataUtils::Uri & uri)

Sets the source table uri.

Definition at line 176 of file qgsdbimportvectorlayerdialog.cpp.

◆ sourceLayer()

QgsVectorLayer * QgsDbImportVectorLayerDialog::sourceLayer ( ) const

Returns the source layer, or nullptr if no source layer is set.

Definition at line 321 of file qgsdbimportvectorlayerdialog.cpp.

◆ tableComment()

QString QgsDbImportVectorLayerDialog::tableComment ( ) const

Returns the optional comment to use for the new table.

Definition at line 311 of file qgsdbimportvectorlayerdialog.cpp.

◆ tableName()

QString QgsDbImportVectorLayerDialog::tableName ( ) const

Returns the destination table name.

Definition at line 306 of file qgsdbimportvectorlayerdialog.cpp.


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