Class: QgsVectorLayerSaveAsDialog¶
- class qgis.gui.QgsVectorLayerSaveAsDialog¶
Bases:
PyQt5.QtWidgets.QDialog
Class to select destination file, type and CRS for ogr layers
QgsVectorLayerSaveAsDialog(layer:
QgsVectorLayer
, options: Union[QgsVectorLayerSaveAsDialog.Options, QgsVectorLayerSaveAsDialog.Option] = QgsVectorLayerSaveAsDialog.Option.AllOptions, parent: QWidget = None, fl: Union[Qt.WindowFlags, Qt.WindowType] = Qt.WindowFlags()) Construct a new QgsVectorLayerSaveAsDialogEnums
Bases:
enum.IntEnum
Methods
Returns
True
if the "add to canvas" checkbox is checked.Returns selected attributes that must be exported with their displayed values instead of their raw values.
Returns a list of export names for attributes.
Returns
True
if geometry type is set to automatic.Returns the creation action.
Returns the CRS chosen for export.
Returns a list of additional data source options which are passed to OGR.
Returns the selected encoding for the target file.
Returns the target filename.
Determines the extent to be exported.
Returns
True
if force multi geometry type is checked.Returns the selected format in which the export should be written.
Returns the selected flat geometry type for the export.
Determines if filtering the export by an extent is activated.
Returns
True
if include z dimension is checked.Returns the target layer name.
Returns a list of additional layer options which are passed to OGR.
Returns whether only selected features will be saved.
Returns
True
if the persist metadata (copy source metadata to destination layer) option is checked.Returns the specified map scale.
Returns a list of attributes which are selected for saving.
Sets whether the "add to canvas" checkbox should be
checked
.Sets whether the force multi geometry checkbox should be checked.
Sets whether the include z dimension checkbox should be checked.
Sets a map
canvas
to associate with the dialog.Sets whether only selected features will be saved.
Returns type of symbology export.
- class Option(value)¶
Bases:
enum.IntEnum
Available dialog options.
Symbology
: Show symbology optionsDestinationCrs
: Show destination CRS (reprojection) optionFields
: Show field customization groupAddToCanvas
: Show add to map optionSelectedOnly
: Show selected features only optionGeometryType
: Show geometry groupExtent
: Show extent groupMetadata
: Show metadata optionsAllOptions
:
- AddToCanvas = 16¶
- AllOptions = -1¶
- DestinationCrs = 4¶
- Extent = 128¶
- Fields = 8¶
- GeometryType = 64¶
- Metadata = 256¶
- SelectedOnly = 32¶
- Symbology = 1¶
- baseClass¶
alias of
QgsVectorLayerSaveAsDialog
- class Options¶
- class Options(Union[QgsVectorLayerSaveAsDialog.Options, QgsVectorLayerSaveAsDialog.Option])
- class Options(QgsVectorLayerSaveAsDialog.Options)
Bases:
sip.wrapper
- baseClass¶
alias of
QgsVectorLayerSaveAsDialog
- accept(self)¶
- actionEvent(self, QActionEvent)¶
- addToCanvas(self) bool ¶
Returns
True
if the “add to canvas” checkbox is checked.See also
- Return type:
bool
- attributesAsDisplayedValues(self) List[int] ¶
Returns selected attributes that must be exported with their displayed values instead of their raw values.
- Return type:
List[int]
- attributesExportNames(self) List[str] ¶
Returns a list of export names for attributes.
- Return type:
List[str]
- automaticGeometryType(self) bool ¶
Returns
True
if geometry type is set to automatic.See also
- Return type:
bool
- 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)¶
- creationActionOnExistingFile(self) QgsVectorFileWriter.ActionOnExistingFile ¶
Returns the creation action.
- Return type:
- crs(self) QgsCoordinateReferenceSystem ¶
Returns the CRS chosen for export.
New in version 3.14.
- Return type:
- customEvent(self, QEvent)¶
- datasourceOptions(self) List[str] ¶
Returns a list of additional data source options which are passed to OGR. Refer to the OGR documentation for the target format for available options.
See also
- Return type:
List[str]
- destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)¶
- disconnectNotify(self, QMetaMethod)¶
- dragEnterEvent(self, QDragEnterEvent)¶
- dragLeaveEvent(self, QDragLeaveEvent)¶
- dragMoveEvent(self, QDragMoveEvent)¶
- dropEvent(self, QDropEvent)¶
- encoding(self) str ¶
Returns the selected encoding for the target file.
- Return type:
str
- enterEvent(self, QEvent)¶
- event(self, QEvent) bool ¶
- eventFilter(self, QObject, QEvent) bool ¶
- fileName(self) str ¶
Returns the target filename.
See also
- Return type:
str
- filterExtent(self) QgsRectangle ¶
Determines the extent to be exported.
See also
- Return type:
- focusInEvent(self, QFocusEvent)¶
- focusNextChild(self) bool ¶
- focusNextPrevChild(self, bool) bool ¶
- focusOutEvent(self, QFocusEvent)¶
- focusPreviousChild(self) bool ¶
- forceMulti(self) bool ¶
Returns
True
if force multi geometry type is checked.See also
See also
- Return type:
bool
- format(self) str ¶
Returns the selected format in which the export should be written.
See also
QgsVectorFileWriter.filterForDriver()
- Return type:
str
- geometryType(self) Qgis.WkbType ¶
Returns the selected flat geometry type for the export.
See also
See also
See also
- Return type:
- hasFilterExtent(self) bool ¶
Determines if filtering the export by an extent is activated.
See also
- Return type:
bool
- hideEvent(self, QHideEvent)¶
- includeZ(self) bool ¶
Returns
True
if include z dimension is checked.See also
See also
- Return type:
bool
- initPainter(self, QPainter)¶
- inputMethodEvent(self, QInputMethodEvent)¶
- isSignalConnected(self, QMetaMethod) bool ¶
- keyPressEvent(self, QKeyEvent)¶
- keyReleaseEvent(self, QKeyEvent)¶
- layerName(self) str ¶
Returns the target layer name.
See also
- Return type:
str
- layerOptions(self) List[str] ¶
Returns a list of additional layer options which are passed to OGR. Refer to the OGR documentation for the target format for available options.
See also
- Return type:
List[str]
- 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] ¶
- onlySelected(self) bool ¶
Returns whether only selected features will be saved.
See also
- Return type:
bool
- paintEvent(self, QPaintEvent)¶
- persistMetadata(self) bool ¶
Returns
True
if the persist metadata (copy source metadata to destination layer) option is checked.New in version 3.20.
- Return type:
bool
- receivers(self, PYQT_SIGNAL) int ¶
- resizeEvent(self, QResizeEvent)¶
- scale(self) float ¶
Returns the specified map scale. The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map.
- Return type:
float
- selectedAttributes(self) List[int] ¶
Returns a list of attributes which are selected for saving.
- Return type:
List[int]
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setAddToCanvas(self, checked: bool)¶
Sets whether the “add to canvas” checkbox should be
checked
.See also
New in version 3.6.
- Parameters:
checked (bool) –
- setForceMulti(self, checked: bool)¶
Sets whether the force multi geometry checkbox should be checked.
See also
- Parameters:
checked (bool) –
- setIncludeZ(self, checked: bool)¶
Sets whether the include z dimension checkbox should be checked.
See also
- Parameters:
checked (bool) –
- setMapCanvas(self, canvas: QgsMapCanvas)¶
Sets a map
canvas
to associate with the dialog.- Parameters:
canvas (QgsMapCanvas) –
- setOnlySelected(self, onlySelected: bool)¶
Sets whether only selected features will be saved.
See also
- Parameters:
onlySelected (bool) –
- showEvent(self, QShowEvent)¶
- symbologyExport(self) Qgis.FeatureSymbologyExport ¶
Returns type of symbology export.
- Return type:
- tabletEvent(self, QTabletEvent)¶
- timerEvent(self, QTimerEvent)¶
- updateMicroFocus(self)¶
- wheelEvent(self, QWheelEvent)¶