Class: QgsNewGeoPackageLayerDialog¶
- class qgis.gui.QgsNewGeoPackageLayerDialog¶
Bases:
PyQt5.QtWidgets.QDialog
Dialog to set up parameters to create a new GeoPackage layer, and on
accept()
to create it and add it to the layersQgsNewGeoPackageLayerDialog(parent: QWidget = None, fl: Union[Qt.WindowFlags, Qt.WindowType] = QgsGuiUtils.ModalDialogFlags) Constructor
Methods
Returns the database path
Sets the database path widgets to a locked and read-only mode.
Sets whether a newly created layer should automatically be added to the current project.
Sets the
crs
value for the new layer in the dialog.Sets the initial database
path
Sets the
behavior
to use when a path to an existing geopackage file is used.Attributes
- 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) –
- showEvent(self, QShowEvent)¶
- tabletEvent(self, QTabletEvent)¶
- timerEvent(self, QTimerEvent)¶
- updateMicroFocus(self)¶
- wheelEvent(self, QWheelEvent)¶