Class: QgsNewGeoPackageLayerDialog

class qgis.gui.QgsNewGeoPackageLayerDialog(parent: QWidget = None, fl: Union[Qt.WindowFlags, Qt.WindowType] = QgsGuiUtils.ModalDialogFlags)

Bases: PyQt5.QtWidgets.QDialog

Constructor

Dialog to set up parameters to create a new GeoPackage layer, and on accept() to create it and add it to the layers

Methods

actionEvent

changeEvent

childEvent

closeEvent

connectNotify

contextMenuEvent

create

customEvent

databasePath

Returns the database path

destroy

disconnectNotify

dragEnterEvent

dragLeaveEvent

dragMoveEvent

dropEvent

enterEvent

event

eventFilter

focusInEvent

focusNextChild

focusNextPrevChild

focusOutEvent

focusPreviousChild

hideEvent

initPainter

inputMethodEvent

isSignalConnected

keyPressEvent

keyReleaseEvent

leaveEvent

lockDatabasePath

Sets the database path widgets to a locked and read-only mode.

metric

mouseDoubleClickEvent

mouseMoveEvent

mousePressEvent

mouseReleaseEvent

moveEvent

nativeEvent

paintEvent

receivers

resizeEvent

sender

senderSignalIndex

setAddToProject

Sets whether a newly created layer should automatically be added to the current project.

setCrs

Sets the crs value for the new layer in the dialog.

setDatabasePath

Sets the initial database path

setOverwriteBehavior

Sets the behavior to use when a path to an existing geopackage file is used.

sharedPainter

showEvent

tabletEvent

timerEvent

updateMicroFocus

wheelEvent

Attributes

AddNewLayer

Overwrite

Prompt

AddNewLayer = 2
Overwrite = 1
class OverwriteBehavior

Bases: int

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

Returns the database path

New in version 3.0.

Return type

str

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
focusInEvent(self, QFocusEvent)
focusNextChild(self) bool
focusNextPrevChild(self, bool) bool
focusOutEvent(self, QFocusEvent)
focusPreviousChild(self) bool
hideEvent(self, QHideEvent)
initPainter(self, QPainter)
inputMethodEvent(self, QInputMethodEvent)
isSignalConnected(self, QMetaMethod) bool
keyPressEvent(self, QKeyEvent)
keyReleaseEvent(self, QKeyEvent)
leaveEvent(self, QEvent)
lockDatabasePath(self)

Sets the database path widgets to a locked and read-only mode.

New in version 3.0.

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], sip.voidptr) Tuple[bool, int]
paintEvent(self, QPaintEvent)
receivers(self, PYQT_SIGNAL) int
resizeEvent(self, QResizeEvent)
sender(self) QObject
senderSignalIndex(self) int
setAddToProject(self, addToProject: bool)

Sets whether a newly created layer should automatically be added to the current project. Defaults to True.

New in version 3.6.

Parameters

addToProject (bool) –

setCrs(self, crs: QgsCoordinateReferenceSystem)

Sets the crs value for the new layer in the dialog.

New in version 3.0.

Parameters

crs (QgsCoordinateReferenceSystem) –

setDatabasePath(self, path: str)

Sets the initial database path

New in version 3.0.

Parameters

path (str) –

setOverwriteBehavior(self, behavior: QgsNewGeoPackageLayerDialog.OverwriteBehavior)

Sets the behavior to use when a path to an existing geopackage file is used.

The default behavior is to prompt the user for an action to take.

New in version 3.0.

Parameters

behavior (QgsNewGeoPackageLayerDialog.OverwriteBehavior) –

sharedPainter(self) QPainter
showEvent(self, QShowEvent)
tabletEvent(self, QTabletEvent)
timerEvent(self, QTimerEvent)
updateMicroFocus(self)
wheelEvent(self, QWheelEvent)