Class: QgsNewVectorTableDialog¶
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()
Added in version 3.16.
Class Hierarchy¶
Base classes¶
Methods
Returns |
|
Returns the CRS |
|
Returns the fields |
|
Returns the geometry column name |
|
Returns the geometry type |
|
Returns the schema name |
|
Sets the CRS to crs |
|
Sets the fields to fields |
|
Sets the geometry type |
|
Sets the schema name |
|
Sets the table name |
|
Returns the table name |
|
Returns the validation errors or an empty list if the dialog is valid |
- class qgis.gui.QgsNewVectorTableDialog[source]¶
Bases:
QDialog
- __init__(conn: QgsAbstractDatabaseProviderConnection | None, parent: QWidget | None = None)
QgsNewVectorTableDialog constructor
- Parameters:
conn (Optional[QgsAbstractDatabaseProviderConnection]) – DB connection, ownership is NOT transferred
parent (Optional[QWidget] = None) – optional parent
- createSpatialIndex(self) bool [source]¶
Returns
True
if spatialindex checkbox is checked.- Return type:
bool
- crs(self) QgsCoordinateReferenceSystem [source]¶
Returns the CRS
- Return type:
- geometryType(self) Qgis.WkbType [source]¶
Returns the geometry type
- Return type:
- setCrs(self, crs: QgsCoordinateReferenceSystem)[source]¶
Sets the CRS to
crs
- Parameters:
- setFields(self, fields: QgsFields)[source]¶
Sets the fields to
fields
- Parameters:
fields (QgsFields)
- setGeometryType(self, type: Qgis.WkbType)[source]¶
Sets the geometry
type
- Parameters:
type (Qgis.WkbType)