QGIS API Documentation
3.22.4-Białowieża (ce8e65e95e)
|
Class to select destination file, type and CRS for ogr layers. More...
#include <qgsvectorlayersaveasdialog.h>
Public Types | |
enum | Option { Symbology = 1 , DestinationCrs = 1 << 2 , Fields = 1 << 3 , AddToCanvas = 1 << 4 , SelectedOnly = 1 << 5 , GeometryType = 1 << 6 , Extent = 1 << 7 , Metadata = 1 << 8 , AllOptions = ~0 } |
Bitmask of options to be shown. More... | |
Public Member Functions | |
Q_DECL_DEPRECATED | QgsVectorLayerSaveAsDialog (long srsid, QWidget *parent=nullptr, Qt::WindowFlags fl=Qt::WindowFlags()) |
Construct a new QgsVectorLayerSaveAsDialog. More... | |
QgsVectorLayerSaveAsDialog (QgsVectorLayer *layer, Options options=AllOptions, QWidget *parent=nullptr, Qt::WindowFlags fl=Qt::WindowFlags()) | |
Construct a new QgsVectorLayerSaveAsDialog. More... | |
bool | addToCanvas () const |
Returns true if the "add to canvas" checkbox is checked. More... | |
QgsAttributeList | attributesAsDisplayedValues () const |
Returns selected attributes that must be exported with their displayed values instead of their raw values. Added in QGIS 2.16. More... | |
bool | automaticGeometryType () const |
Returns true if geometry type is set to automatic. More... | |
QgsVectorFileWriter::ActionOnExistingFile | creationActionOnExistingFile () const |
Returns creation action. More... | |
Q_DECL_DEPRECATED long | crs () const |
Returns the internal CRS ID. More... | |
QgsCoordinateReferenceSystem | crsObject () const |
Returns the CRS chosen for export. More... | |
QStringList | datasourceOptions () const |
Returns a list of additional data source options which are passed to OGR. More... | |
QString | encoding () const |
The encoding of the target file. More... | |
QString | filename () const |
Returns the target filename. More... | |
QgsRectangle | filterExtent () const |
Determines the extent to be exported. More... | |
bool | forceMulti () const |
Returns true if force multi geometry type is checked. More... | |
QString | format () const |
The format in which the export should be written. More... | |
QgsWkbTypes::Type | geometryType () const |
Returns the selected flat geometry type for the export. More... | |
bool | hasFilterExtent () const |
Determines if filtering the export by an extent is activated. More... | |
bool | includeZ () const |
Returns true if include z dimension is checked. More... | |
QString | layername () const |
Returns the target layer name. More... | |
QStringList | layerOptions () const |
Returns a list of additional layer options which are passed to OGR. More... | |
bool | onlySelected () const |
Returns whether only selected features will be saved. More... | |
bool | persistMetadata () const |
Returns true if the persist metadata (copy source metadata to destination layer) option is checked. More... | |
double | scale () const |
Returns the specified map scale. More... | |
QgsAttributeList | selectedAttributes () const |
Returns a list of attributes which are selected for saving. More... | |
void | setAddToCanvas (bool checked) |
Sets whether the "add to canvas" checkbox should be checked. More... | |
void | setForceMulti (bool checked) |
Sets whether the force multi geometry checkbox should be checked. More... | |
void | setIncludeZ (bool checked) |
Sets whether the include z dimension checkbox should be checked. More... | |
void | setMapCanvas (QgsMapCanvas *canvas) |
Sets a map canvas to associate with the dialog. More... | |
void | setOnlySelected (bool onlySelected) |
Sets whether only selected features will be saved. More... | |
int | symbologyExport () const |
Returns type of symbology export. More... | |
Class to select destination file, type and CRS for ogr layers.
Definition at line 38 of file qgsvectorlayersaveasdialog.h.
Bitmask of options to be shown.
Definition at line 45 of file qgsvectorlayersaveasdialog.h.
QgsVectorLayerSaveAsDialog::QgsVectorLayerSaveAsDialog | ( | long | srsid, |
QWidget * | parent = nullptr , |
||
Qt::WindowFlags | fl = Qt::WindowFlags() |
||
) |
Construct a new QgsVectorLayerSaveAsDialog.
Definition at line 44 of file qgsvectorlayersaveasdialog.cpp.
QgsVectorLayerSaveAsDialog::QgsVectorLayerSaveAsDialog | ( | QgsVectorLayer * | layer, |
Options | options = AllOptions , |
||
QWidget * | parent = nullptr , |
||
Qt::WindowFlags | fl = Qt::WindowFlags() |
||
) |
Construct a new QgsVectorLayerSaveAsDialog.
Definition at line 54 of file qgsvectorlayersaveasdialog.cpp.
bool QgsVectorLayerSaveAsDialog::addToCanvas | ( | ) | const |
Returns true
if the "add to canvas" checkbox is checked.
Definition at line 946 of file qgsvectorlayersaveasdialog.cpp.
QgsAttributeList QgsVectorLayerSaveAsDialog::attributesAsDisplayedValues | ( | ) | const |
Returns selected attributes that must be exported with their displayed values instead of their raw values. Added in QGIS 2.16.
Definition at line 929 of file qgsvectorlayersaveasdialog.cpp.
bool QgsVectorLayerSaveAsDialog::automaticGeometryType | ( | ) | const |
Returns true
if geometry type is set to automatic.
Definition at line 1011 of file qgsvectorlayersaveasdialog.cpp.
QgsVectorFileWriter::ActionOnExistingFile QgsVectorLayerSaveAsDialog::creationActionOnExistingFile | ( | ) | const |
Returns creation action.
Definition at line 1032 of file qgsvectorlayersaveasdialog.cpp.
long QgsVectorLayerSaveAsDialog::crs | ( | ) | const |
Returns the internal CRS ID.
Definition at line 786 of file qgsvectorlayersaveasdialog.cpp.
QgsCoordinateReferenceSystem QgsVectorLayerSaveAsDialog::crsObject | ( | ) | const |
Returns the CRS chosen for export.
Definition at line 791 of file qgsvectorlayersaveasdialog.cpp.
QStringList QgsVectorLayerSaveAsDialog::datasourceOptions | ( | ) | const |
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.
Definition at line 796 of file qgsvectorlayersaveasdialog.cpp.
QString QgsVectorLayerSaveAsDialog::encoding | ( | ) | const |
The encoding of the target file.
Definition at line 776 of file qgsvectorlayersaveasdialog.cpp.
QString QgsVectorLayerSaveAsDialog::filename | ( | ) | const |
Returns the target filename.
Definition at line 766 of file qgsvectorlayersaveasdialog.cpp.
QgsRectangle QgsVectorLayerSaveAsDialog::filterExtent | ( | ) | const |
Determines the extent to be exported.
Definition at line 979 of file qgsvectorlayersaveasdialog.cpp.
bool QgsVectorLayerSaveAsDialog::forceMulti | ( | ) | const |
Returns true
if force multi geometry type is checked.
Definition at line 1017 of file qgsvectorlayersaveasdialog.cpp.
QString QgsVectorLayerSaveAsDialog::format | ( | ) | const |
The format in which the export should be written.
Definition at line 781 of file qgsvectorlayersaveasdialog.cpp.
QgsWkbTypes::Type QgsVectorLayerSaveAsDialog::geometryType | ( | ) | const |
Returns the selected flat geometry type for the export.
Definition at line 999 of file qgsvectorlayersaveasdialog.cpp.
bool QgsVectorLayerSaveAsDialog::hasFilterExtent | ( | ) | const |
Determines if filtering the export by an extent is activated.
Definition at line 974 of file qgsvectorlayersaveasdialog.cpp.
bool QgsVectorLayerSaveAsDialog::includeZ | ( | ) | const |
Returns true
if include z dimension is checked.
Definition at line 1027 of file qgsvectorlayersaveasdialog.cpp.
QString QgsVectorLayerSaveAsDialog::layername | ( | ) | const |
Returns the target layer name.
Definition at line 771 of file qgsvectorlayersaveasdialog.cpp.
QStringList QgsVectorLayerSaveAsDialog::layerOptions | ( | ) | const |
Returns a list of additional layer options which are passed to OGR.
Refer to the OGR documentation for the target format for available options.
Definition at line 855 of file qgsvectorlayersaveasdialog.cpp.
bool QgsVectorLayerSaveAsDialog::onlySelected | ( | ) | const |
Returns whether only selected features will be saved.
Definition at line 989 of file qgsvectorlayersaveasdialog.cpp.
bool QgsVectorLayerSaveAsDialog::persistMetadata | ( | ) | const |
Returns true
if the persist metadata (copy source metadata to destination layer) option is checked.
Definition at line 994 of file qgsvectorlayersaveasdialog.cpp.
double QgsVectorLayerSaveAsDialog::scale | ( | ) | const |
Returns the specified map scale.
The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map.
Definition at line 961 of file qgsvectorlayersaveasdialog.cpp.
QgsAttributeList QgsVectorLayerSaveAsDialog::selectedAttributes | ( | ) | const |
Returns a list of attributes which are selected for saving.
Definition at line 914 of file qgsvectorlayersaveasdialog.cpp.
void QgsVectorLayerSaveAsDialog::setAddToCanvas | ( | bool | checked | ) |
Sets whether the "add to canvas" checkbox should be checked.
Definition at line 951 of file qgsvectorlayersaveasdialog.cpp.
void QgsVectorLayerSaveAsDialog::setForceMulti | ( | bool | checked | ) |
Sets whether the force multi geometry checkbox should be checked.
Definition at line 1022 of file qgsvectorlayersaveasdialog.cpp.
void QgsVectorLayerSaveAsDialog::setIncludeZ | ( | bool | checked | ) |
Sets whether the include z dimension checkbox should be checked.
Definition at line 1037 of file qgsvectorlayersaveasdialog.cpp.
void QgsVectorLayerSaveAsDialog::setMapCanvas | ( | QgsMapCanvas * | canvas | ) |
Sets a map canvas to associate with the dialog.
Definition at line 966 of file qgsvectorlayersaveasdialog.cpp.
void QgsVectorLayerSaveAsDialog::setOnlySelected | ( | bool | onlySelected | ) |
Sets whether only selected features will be saved.
Definition at line 984 of file qgsvectorlayersaveasdialog.cpp.
int QgsVectorLayerSaveAsDialog::symbologyExport | ( | ) | const |
Returns type of symbology export.
0: No symbology 1: Feature symbology 2: Symbol level symbology
Definition at line 956 of file qgsvectorlayersaveasdialog.cpp.