QGIS API Documentation
3.6.0-Noosa (5873452)
|
Dialog to set up parameters to create a new GeoPackage layer, and on accept() to create it and add it to the layers. More...
#include <qgsnewgeopackagelayerdialog.h>
Public Types | |
enum | OverwriteBehavior { Prompt, Overwrite, AddNewLayer } |
Behavior to use when an existing geopackage already exists. More... | |
Public Member Functions | |
QgsNewGeoPackageLayerDialog (QWidget *parent=nullptr, Qt::WindowFlags fl=QgsGuiUtils::ModalDialogFlags) | |
Constructor. More... | |
QString | databasePath () const |
Returns the database path. More... | |
void | lockDatabasePath () |
Sets the database path widgets to a locked and read-only mode. More... | |
void | setAddToProject (bool addToProject) |
Sets whether a newly created layer should automatically be added to the current project. More... | |
void | setCrs (const QgsCoordinateReferenceSystem &crs) |
Sets the crs value for the new layer in the dialog. More... | |
void | setDatabasePath (const QString &path) |
Sets the initial database path. More... | |
void | setOverwriteBehavior (OverwriteBehavior behavior) |
Sets the behavior to use when a path to an existing geopackage file is used. More... | |
Dialog to set up parameters to create a new GeoPackage layer, and on accept() to create it and add it to the layers.
Definition at line 29 of file qgsnewgeopackagelayerdialog.h.
Behavior to use when an existing geopackage already exists.
Enumerator | |
---|---|
Prompt | Prompt user for action. |
Overwrite | Overwrite whole geopackage. |
AddNewLayer | Keep existing contents and add new layer. |
Definition at line 36 of file qgsnewgeopackagelayerdialog.h.
QgsNewGeoPackageLayerDialog::QgsNewGeoPackageLayerDialog | ( | QWidget * | parent = nullptr , |
Qt::WindowFlags | fl = QgsGuiUtils::ModalDialogFlags |
||
) |
Constructor.
Definition at line 49 of file qgsnewgeopackagelayerdialog.cpp.
|
inline |
Returns the database path.
Definition at line 56 of file qgsnewgeopackagelayerdialog.h.
void QgsNewGeoPackageLayerDialog::lockDatabasePath | ( | ) |
Sets the database path widgets to a locked and read-only mode.
Definition at line 140 of file qgsnewgeopackagelayerdialog.cpp.
void QgsNewGeoPackageLayerDialog::setAddToProject | ( | bool | addToProject | ) |
Sets whether a newly created layer should automatically be added to the current project.
Defaults to true.
Definition at line 527 of file qgsnewgeopackagelayerdialog.cpp.
void QgsNewGeoPackageLayerDialog::setCrs | ( | const QgsCoordinateReferenceSystem & | crs | ) |
Sets the crs value for the new layer in the dialog.
Definition at line 135 of file qgsnewgeopackagelayerdialog.cpp.
|
inline |
Sets the initial database path.
Definition at line 62 of file qgsnewgeopackagelayerdialog.h.
void QgsNewGeoPackageLayerDialog::setOverwriteBehavior | ( | OverwriteBehavior | behavior | ) |
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.
Definition at line 522 of file qgsnewgeopackagelayerdialog.cpp.