QGIS API Documentation 3.36.0-Maidenhead (09951dc0acf)
|
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. | |
bool | createSpatialIndex () |
Returns true if spatialindex checkbox is cheched. | |
QgsCoordinateReferenceSystem | crs () const |
Returns the CRS. | |
QgsFields | fields () const |
Returns the fields. | |
QString | geometryColumnName () const |
Returns the geometry column name. | |
Qgis::WkbType | geometryType () const |
Returns the geometry type. | |
QString | schemaName () const |
Returns the schema name. | |
void | setCrs (const QgsCoordinateReferenceSystem &crs) |
Sets the CRS to crs. | |
void | setFields (const QgsFields &fields) |
Sets the fields to fields. | |
void | setGeometryType (Qgis::WkbType type) |
Sets the geometry type. | |
void | setSchemaName (const QString &name) |
Sets the schema name. | |
void | setTableName (const QString &name) |
Sets the table name. | |
QString | tableName () const |
Returns the table name. | |
QStringList | validationErrors () const |
Returns the validation errors or an empty list if the dialog is valid. | |
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 25 of file qgsnewvectortabledialog.cpp.
bool QgsNewVectorTableDialog::createSpatialIndex | ( | ) |
Returns true
if spatialindex checkbox is cheched.
Definition at line 343 of file qgsnewvectortabledialog.cpp.
QgsCoordinateReferenceSystem QgsNewVectorTableDialog::crs | ( | ) | const |
Returns the CRS.
Definition at line 295 of file qgsnewvectortabledialog.cpp.
QgsFields QgsNewVectorTableDialog::fields | ( | ) | const |
Returns the fields.
Definition at line 315 of file qgsnewvectortabledialog.cpp.
QString QgsNewVectorTableDialog::geometryColumnName | ( | ) | const |
Returns the geometry column name.
Definition at line 310 of file qgsnewvectortabledialog.cpp.
Qgis::WkbType QgsNewVectorTableDialog::geometryType | ( | ) | const |
Returns the geometry type.
Definition at line 320 of file qgsnewvectortabledialog.cpp.
QString QgsNewVectorTableDialog::schemaName | ( | ) | const |
Returns the schema name.
Definition at line 305 of file qgsnewvectortabledialog.cpp.
void QgsNewVectorTableDialog::setCrs | ( | const QgsCoordinateReferenceSystem & | crs | ) |
Sets the CRS to crs.
Definition at line 290 of file qgsnewvectortabledialog.cpp.
void QgsNewVectorTableDialog::setFields | ( | const QgsFields & | fields | ) |
Sets the fields to fields.
Definition at line 335 of file qgsnewvectortabledialog.cpp.
void QgsNewVectorTableDialog::setGeometryType | ( | Qgis::WkbType | type | ) |
Sets the geometry type.
Definition at line 285 of file qgsnewvectortabledialog.cpp.
void QgsNewVectorTableDialog::setSchemaName | ( | const QString & | name | ) |
Sets the schema name.
Definition at line 275 of file qgsnewvectortabledialog.cpp.
void QgsNewVectorTableDialog::setTableName | ( | const QString & | name | ) |
Sets the table name.
Definition at line 280 of file qgsnewvectortabledialog.cpp.
|
overrideprotected |
Definition at line 427 of file qgsnewvectortabledialog.cpp.
QString QgsNewVectorTableDialog::tableName | ( | ) | const |
Returns the table name.
Definition at line 300 of file qgsnewvectortabledialog.cpp.
QStringList QgsNewVectorTableDialog::validationErrors | ( | ) | const |
Returns the validation errors or an empty list if the dialog is valid.
Definition at line 348 of file qgsnewvectortabledialog.cpp.