QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
|
Class to select destination file, type and CRS for ogr layers. More...
#include <qgsvectorlayersaveasdialog.h>
Public Types | |
enum class | Option : int { 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 } |
Available dialog options. More... | |
typedef QFlags< Option > | Options |
Available dialog options. | |
Public Member Functions | |
Q_DECL_DEPRECATED | QgsVectorLayerSaveAsDialog (long srsid, QWidget *parent=nullptr, Qt::WindowFlags fl=Qt::WindowFlags()) |
Construct a new QgsVectorLayerSaveAsDialog. | |
QgsVectorLayerSaveAsDialog (QgsVectorLayer *layer, QgsVectorLayerSaveAsDialog::Options options=QgsVectorLayerSaveAsDialog::Option::AllOptions, QWidget *parent=nullptr, Qt::WindowFlags fl=Qt::WindowFlags()) | |
Construct a new QgsVectorLayerSaveAsDialog. | |
void | accept () override |
bool | addToCanvas () const |
Returns true if the "add to canvas" checkbox is checked. | |
QgsAttributeList | attributesAsDisplayedValues () const |
Returns selected attributes that must be exported with their displayed values instead of their raw values. | |
QStringList | attributesExportNames () const |
Returns a list of export names for attributes. | |
bool | automaticGeometryType () const |
Returns true if geometry type is set to automatic. | |
QgsVectorFileWriter::ActionOnExistingFile | creationActionOnExistingFile () const |
Returns the creation action. | |
QgsCoordinateReferenceSystem | crs () const |
Returns the CRS chosen for export. | |
QStringList | datasourceOptions () const |
Returns a list of additional data source options which are passed to OGR. | |
QString | encoding () const |
Returns the selected encoding for the target file. | |
QString | fileName () const |
Returns the target filename. | |
QgsRectangle | filterExtent () const |
Determines the extent to be exported. | |
bool | forceMulti () const |
Returns true if force multi geometry type is checked. | |
QString | format () const |
Returns the selected format in which the export should be written. | |
Qgis::WkbType | geometryType () const |
Returns the selected flat geometry type for the export. | |
bool | hasFilterExtent () const |
Determines if filtering the export by an extent is activated. | |
bool | includeZ () const |
Returns true if include z dimension is checked. | |
QString | layerName () const |
Returns the target layer name. | |
QStringList | layerOptions () const |
Returns a list of additional layer options which are passed to OGR. | |
bool | onlySelected () const |
Returns whether only selected features will be saved. | |
bool | persistMetadata () const |
Returns true if the persist metadata (copy source metadata to destination layer) option is checked. | |
double | scale () const |
Returns the specified map scale. | |
QgsAttributeList | selectedAttributes () const |
Returns a list of attributes which are selected for saving. | |
void | setAddToCanvas (bool checked) |
Sets whether the "add to canvas" checkbox should be checked. | |
void | setForceMulti (bool checked) |
Sets whether the force multi geometry checkbox should be checked. | |
void | setIncludeZ (bool checked) |
Sets whether the include z dimension checkbox should be checked. | |
void | setMapCanvas (QgsMapCanvas *canvas) |
Sets a map canvas to associate with the dialog. | |
void | setOnlySelected (bool onlySelected) |
Sets whether only selected features will be saved. | |
Qgis::FeatureSymbologyExport | symbologyExport () const |
Returns type of symbology export. | |
Class to select destination file, type and CRS for ogr layers.
Definition at line 32 of file qgsvectorlayersaveasdialog.h.
typedef QFlags< Option > QgsVectorLayerSaveAsDialog::Options |
Available dialog options.
Definition at line 58 of file qgsvectorlayersaveasdialog.h.
|
strong |
Available dialog options.
Definition at line 41 of file qgsvectorlayersaveasdialog.h.
QgsVectorLayerSaveAsDialog::QgsVectorLayerSaveAsDialog | ( | long | srsid, |
QWidget * | parent = nullptr , |
||
Qt::WindowFlags | fl = Qt::WindowFlags() |
||
) |
Construct a new QgsVectorLayerSaveAsDialog.
Definition at line 41 of file qgsvectorlayersaveasdialog.cpp.
QgsVectorLayerSaveAsDialog::QgsVectorLayerSaveAsDialog | ( | QgsVectorLayer * | layer, |
QgsVectorLayerSaveAsDialog::Options | options = QgsVectorLayerSaveAsDialog::Option::AllOptions , |
||
QWidget * | parent = nullptr , |
||
Qt::WindowFlags | fl = Qt::WindowFlags() |
||
) |
Construct a new QgsVectorLayerSaveAsDialog.
Definition at line 49 of file qgsvectorlayersaveasdialog.cpp.
|
override |
Definition at line 309 of file qgsvectorlayersaveasdialog.cpp.
bool QgsVectorLayerSaveAsDialog::addToCanvas | ( | ) | const |
Returns true
if the "add to canvas" checkbox is checked.
Definition at line 1139 of file qgsvectorlayersaveasdialog.cpp.
QgsAttributeList QgsVectorLayerSaveAsDialog::attributesAsDisplayedValues | ( | ) | const |
Returns selected attributes that must be exported with their displayed values instead of their raw values.
Definition at line 1113 of file qgsvectorlayersaveasdialog.cpp.
QStringList QgsVectorLayerSaveAsDialog::attributesExportNames | ( | ) | const |
Returns a list of export names for attributes.
Definition at line 1130 of file qgsvectorlayersaveasdialog.cpp.
bool QgsVectorLayerSaveAsDialog::automaticGeometryType | ( | ) | const |
Returns true
if geometry type is set to automatic.
Definition at line 1206 of file qgsvectorlayersaveasdialog.cpp.
QgsVectorFileWriter::ActionOnExistingFile QgsVectorLayerSaveAsDialog::creationActionOnExistingFile | ( | ) | const |
Returns the creation action.
Definition at line 1227 of file qgsvectorlayersaveasdialog.cpp.
QgsCoordinateReferenceSystem QgsVectorLayerSaveAsDialog::crs | ( | ) | const |
Returns the CRS chosen for export.
Definition at line 973 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 978 of file qgsvectorlayersaveasdialog.cpp.
QString QgsVectorLayerSaveAsDialog::encoding | ( | ) | const |
Returns the selected encoding for the target file.
Definition at line 963 of file qgsvectorlayersaveasdialog.cpp.
QString QgsVectorLayerSaveAsDialog::fileName | ( | ) | const |
Returns the target filename.
Definition at line 953 of file qgsvectorlayersaveasdialog.cpp.
QgsRectangle QgsVectorLayerSaveAsDialog::filterExtent | ( | ) | const |
Determines the extent to be exported.
Definition at line 1174 of file qgsvectorlayersaveasdialog.cpp.
bool QgsVectorLayerSaveAsDialog::forceMulti | ( | ) | const |
Returns true
if force multi geometry type is checked.
Definition at line 1212 of file qgsvectorlayersaveasdialog.cpp.
QString QgsVectorLayerSaveAsDialog::format | ( | ) | const |
Returns the selected format in which the export should be written.
Definition at line 968 of file qgsvectorlayersaveasdialog.cpp.
Qgis::WkbType QgsVectorLayerSaveAsDialog::geometryType | ( | ) | const |
Returns the selected flat geometry type for the export.
Definition at line 1194 of file qgsvectorlayersaveasdialog.cpp.
bool QgsVectorLayerSaveAsDialog::hasFilterExtent | ( | ) | const |
Determines if filtering the export by an extent is activated.
Definition at line 1169 of file qgsvectorlayersaveasdialog.cpp.
bool QgsVectorLayerSaveAsDialog::includeZ | ( | ) | const |
Returns true
if include z dimension is checked.
Definition at line 1222 of file qgsvectorlayersaveasdialog.cpp.
QString QgsVectorLayerSaveAsDialog::layerName | ( | ) | const |
Returns the target layer name.
Definition at line 958 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 1038 of file qgsvectorlayersaveasdialog.cpp.
bool QgsVectorLayerSaveAsDialog::onlySelected | ( | ) | const |
Returns whether only selected features will be saved.
Definition at line 1184 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 1189 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 1156 of file qgsvectorlayersaveasdialog.cpp.
QgsAttributeList QgsVectorLayerSaveAsDialog::selectedAttributes | ( | ) | const |
Returns a list of attributes which are selected for saving.
Definition at line 1098 of file qgsvectorlayersaveasdialog.cpp.
void QgsVectorLayerSaveAsDialog::setAddToCanvas | ( | bool | checked | ) |
Sets whether the "add to canvas" checkbox should be checked.
Definition at line 1144 of file qgsvectorlayersaveasdialog.cpp.
void QgsVectorLayerSaveAsDialog::setForceMulti | ( | bool | checked | ) |
Sets whether the force multi geometry checkbox should be checked.
Definition at line 1217 of file qgsvectorlayersaveasdialog.cpp.
void QgsVectorLayerSaveAsDialog::setIncludeZ | ( | bool | checked | ) |
Sets whether the include z dimension checkbox should be checked.
Definition at line 1232 of file qgsvectorlayersaveasdialog.cpp.
void QgsVectorLayerSaveAsDialog::setMapCanvas | ( | QgsMapCanvas * | canvas | ) |
Sets a map canvas to associate with the dialog.
Definition at line 1161 of file qgsvectorlayersaveasdialog.cpp.
void QgsVectorLayerSaveAsDialog::setOnlySelected | ( | bool | onlySelected | ) |
Sets whether only selected features will be saved.
Definition at line 1179 of file qgsvectorlayersaveasdialog.cpp.
Qgis::FeatureSymbologyExport QgsVectorLayerSaveAsDialog::symbologyExport | ( | ) | const |
Returns type of symbology export.
Definition at line 1151 of file qgsvectorlayersaveasdialog.cpp.