Class: QgsNewGeoPackageLayerDialog¶
Dialog to set up parameters to create a new GeoPackage layer, and on
accept() to create it and add it to the layers.
List of all members, including inherited members
Class Hierarchy¶
Base classes¶
Classes
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
- class qgis.gui.QgsNewGeoPackageLayerDialog[source]¶
Bases:
QDialog- __init__(parent: QWidget | None = None, fl: Qt.WindowFlags | Qt.WindowType = QgsGuiUtils.ModalDialogFlags)
Constructor
- Parameters:
parent (Optional[QWidget] = None)
fl (Union[Qt.WindowFlags, Qt.WindowType] = QgsGuiUtils.ModalDialogFlags)
- AddNewLayer = 2¶
- Overwrite = 1¶
- class OverwriteBehavior¶
Bases:
int
- Prompt = 0¶
- setAddToProject(self, addToProject: bool)[source]¶
Sets whether a newly created layer should automatically be added to the current project. Defaults to
True.Added in version 3.6.
- Parameters:
addToProject (bool)
- setCrs(self, crs: QgsCoordinateReferenceSystem)[source]¶
Sets the
crsvalue for the new layer in the dialog.- Parameters:
- setDatabasePath(self, path: str | None)[source]¶
Sets the initial database
path- Parameters:
path (Optional[str])
- setOverwriteBehavior(self, behavior: QgsNewGeoPackageLayerDialog.OverwriteBehavior)[source]¶
Sets the
behaviorto use when a path to an existing geopackage file is used.The default behavior is to prompt the user for an action to take.
- Parameters: