Class: QgsNewVectorTableDialog

class qgis.gui.QgsNewVectorTableDialog

Bases: PyQt5.QtWidgets.QDialog

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()

New in version 3.16.

QgsNewVectorTableDialog(conn: QgsAbstractDatabaseProviderConnection, parent: QWidget = None) QgsNewVectorTableDialog constructor

Parameters:
actionEvent(self, QActionEvent)
changeEvent(self, QEvent)
childEvent(self, QChildEvent)
closeEvent(self, QCloseEvent)
connectNotify(self, QMetaMethod)
contextMenuEvent(self, QContextMenuEvent)
create(self, window: PyQt5.sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)
createSpatialIndex(self) bool

Returns True if spatialindex checkbox is cheched @return

Return type:

bool

crs(self) QgsCoordinateReferenceSystem

Returns the CRS

Return type:

QgsCoordinateReferenceSystem

customEvent(self, QEvent)
destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)
disconnectNotify(self, QMetaMethod)
dragEnterEvent(self, QDragEnterEvent)
dragLeaveEvent(self, QDragLeaveEvent)
dragMoveEvent(self, QDragMoveEvent)
dropEvent(self, QDropEvent)
enterEvent(self, QEvent)
event(self, QEvent) bool
eventFilter(self, QObject, QEvent) bool
fields(self) QgsFields

Returns the fields

Return type:

QgsFields

focusInEvent(self, QFocusEvent)
focusNextChild(self) bool
focusNextPrevChild(self, bool) bool
focusOutEvent(self, QFocusEvent)
focusPreviousChild(self) bool
geometryColumnName(self) str

Returns the geometry column name

Return type:

str

geometryType(self) QgsWkbTypes.Type

Returns the geometry type

Return type:

QgsWkbTypes.Type

hideEvent(self, QHideEvent)
initPainter(self, QPainter)
inputMethodEvent(self, QInputMethodEvent)
isSignalConnected(self, QMetaMethod) bool
keyPressEvent(self, QKeyEvent)
keyReleaseEvent(self, QKeyEvent)
leaveEvent(self, QEvent)
metric(self, QPaintDevice.PaintDeviceMetric) int
mouseDoubleClickEvent(self, QMouseEvent)
mouseMoveEvent(self, QMouseEvent)
mousePressEvent(self, QMouseEvent)
mouseReleaseEvent(self, QMouseEvent)
moveEvent(self, QMoveEvent)
nativeEvent(self, Union[QByteArray, bytes, bytearray], PyQt5.sip.voidptr) Tuple[bool, int]
paintEvent(self, QPaintEvent)
receivers(self, PYQT_SIGNAL) int
resizeEvent(self, QResizeEvent)
schemaName(self) str

Returns the schema name

Return type:

str

sender(self) QObject
senderSignalIndex(self) int
setCrs(self, crs: QgsCoordinateReferenceSystem)

Sets the CRS to crs

Parameters:

crs (QgsCoordinateReferenceSystem) –

setFields(self, fields: QgsFields)

Sets the fields to fields

Parameters:

fields (QgsFields) –

setGeometryType(self, type: QgsWkbTypes.Type)

Sets the geometry type

Parameters:

type (QgsWkbTypes.Type) –

setSchemaName(self, name: str)

Sets the schema name

Parameters:

name (str) –

setTableName(self, name: str)

Sets the table name

Parameters:

name (str) –

sharedPainter(self) QPainter
showEvent(self, event: QShowEvent)
Parameters:

event (QShowEvent) –

tableName(self) str

Returns the table name

Return type:

str

tabletEvent(self, QTabletEvent)
timerEvent(self, QTimerEvent)
updateMicroFocus(self)
validationErrors(self) List[str]

Returns the validation errors or an empty list if the dialog is valid

Return type:

List[str]

wheelEvent(self, QWheelEvent)