QGIS API Documentation
3.22.4-Białowieża (ce8e65e95e)
|
The QgsNewVectorTableDialog class is a provider-agnostic database vector and aspatial table designer dialog based on the connections API. More...
#include <qgsnewvectortabledialog.h>
Public Member Functions | |
QgsNewVectorTableDialog (QgsAbstractDatabaseProviderConnection *conn, QWidget *parent=nullptr) | |
QgsNewVectorTableDialog constructor. More... | |
bool | createSpatialIndex () |
Returns true if spatialindex checkbox is cheched. More... | |
QgsCoordinateReferenceSystem | crs () const |
Returns the CRS. More... | |
QgsFields | fields () const |
Returns the fields. More... | |
QString | geometryColumnName () const |
Returns the geometry column name. More... | |
QgsWkbTypes::Type | geometryType () const |
Returns the geometry type. More... | |
QString | schemaName () const |
Returns the schema name. More... | |
void | setCrs (const QgsCoordinateReferenceSystem &crs) |
Sets the CRS to crs. More... | |
void | setFields (const QgsFields &fields) |
Sets the fields to fields. More... | |
void | setGeometryType (QgsWkbTypes::Type type) |
Sets the geometry type. More... | |
void | setSchemaName (const QString &name) |
Sets the schema name. More... | |
void | setTableName (const QString &name) |
Sets the table name. More... | |
QString | tableName () const |
Returns the table name. More... | |
QStringList | validationErrors () const |
Returns the validation errors or an empty list if the dialog is valid. More... | |
Protected Member Functions | |
void | showEvent (QShowEvent *event) override |
The QgsNewVectorTableDialog class is a provider-agnostic database vector and aspatial table designer dialog based on the connections API.
It allows designing a new vector or aspatial database table by defining the schema (if supported by the provider) and table name, the list of QgsFields, the optional geometry type and SRID.
The actual creation of the table is delegated to the connections API method QgsAbstractDatabaseProviderConnection::createVectorTable()
Definition at line 47 of file qgsnewvectortabledialog.h.
QgsNewVectorTableDialog::QgsNewVectorTableDialog | ( | QgsAbstractDatabaseProviderConnection * | conn, |
QWidget * | parent = nullptr |
||
) |
QgsNewVectorTableDialog constructor.
conn | DB connection, ownership is NOT transferred |
parent | optional parent |
Definition at line 26 of file qgsnewvectortabledialog.cpp.
bool QgsNewVectorTableDialog::createSpatialIndex | ( | ) |
Returns true
if spatialindex checkbox is cheched.
Definition at line 340 of file qgsnewvectortabledialog.cpp.
QgsCoordinateReferenceSystem QgsNewVectorTableDialog::crs | ( | ) | const |
Returns the CRS.
Definition at line 292 of file qgsnewvectortabledialog.cpp.
QgsFields QgsNewVectorTableDialog::fields | ( | ) | const |
Returns the fields.
Definition at line 312 of file qgsnewvectortabledialog.cpp.
QString QgsNewVectorTableDialog::geometryColumnName | ( | ) | const |
Returns the geometry column name.
Definition at line 307 of file qgsnewvectortabledialog.cpp.
QgsWkbTypes::Type QgsNewVectorTableDialog::geometryType | ( | ) | const |
Returns the geometry type.
Definition at line 317 of file qgsnewvectortabledialog.cpp.
QString QgsNewVectorTableDialog::schemaName | ( | ) | const |
Returns the schema name.
Definition at line 302 of file qgsnewvectortabledialog.cpp.
void QgsNewVectorTableDialog::setCrs | ( | const QgsCoordinateReferenceSystem & | crs | ) |
Sets the CRS to crs.
Definition at line 287 of file qgsnewvectortabledialog.cpp.
void QgsNewVectorTableDialog::setFields | ( | const QgsFields & | fields | ) |
Sets the fields to fields.
Definition at line 332 of file qgsnewvectortabledialog.cpp.
void QgsNewVectorTableDialog::setGeometryType | ( | QgsWkbTypes::Type | type | ) |
Sets the geometry type.
Definition at line 282 of file qgsnewvectortabledialog.cpp.
void QgsNewVectorTableDialog::setSchemaName | ( | const QString & | name | ) |
Sets the schema name.
Definition at line 272 of file qgsnewvectortabledialog.cpp.
void QgsNewVectorTableDialog::setTableName | ( | const QString & | name | ) |
Sets the table name.
Definition at line 277 of file qgsnewvectortabledialog.cpp.
|
overrideprotected |
Definition at line 405 of file qgsnewvectortabledialog.cpp.
QString QgsNewVectorTableDialog::tableName | ( | ) | const |
Returns the table name.
Definition at line 297 of file qgsnewvectortabledialog.cpp.
QStringList QgsNewVectorTableDialog::validationErrors | ( | ) | const |
Returns the validation errors or an empty list if the dialog is valid.
Definition at line 345 of file qgsnewvectortabledialog.cpp.