QGIS/python/gui/auto_generated/qgsnewvectorlayerdialog.sip.in
2019-10-15 15:56:54 +02:00

119 lines
4.0 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsnewvectorlayerdialog.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsNewVectorLayerDialog: QDialog
{
%TypeHeaderCode
#include "qgsnewvectorlayerdialog.h"
%End
public:
static QString runAndCreateLayer( QWidget *parent = 0, QString *enc = 0, const QgsCoordinateReferenceSystem &crs = QgsCoordinateReferenceSystem(),
const QString &initialPath = QString() ) /Deprecated/;
%Docstring
Runs the dialog and creates a layer matching the dialog parameters.
If the ``initialPath`` argument is specified, then the dialog will default to the specified filename.
:return: fileName on success, empty string use aborted, QString() if creation failed
.. deprecated:: QGIS 3.4.5
- use execAndCreateLayer() instead.
%End
static QString execAndCreateLayer( QString &errorMessage /Out/, QWidget *parent = 0, const QString &initialPath = QString(), QString *encoding /Out/ = 0, const QgsCoordinateReferenceSystem &crs = QgsCoordinateReferenceSystem() );
%Docstring
Runs the dialog and creates a layer matching the dialog parameters.
If the ``initialPath`` argument is specified, then the dialog will default to the specified filename.
Returns a filename if the dialog was accepted, or an empty string if the dialog was canceled.
If the dialog was accepted but an error occurred while creating the file, then the function will
return an empty string and ``errorMessage`` will contain the error message.
If ``encoding`` is specified, it will be set to the encoding of the created file.
:param parent: parent widget for dialog
:param initialPath: initial file path to show in dialog
:param encoding: if specified, will be set to file encoding of created layer
:param crs: default layer CRS to show in dialog
:return: - Newly created file name, or an empty string if user canceled or an error occurred.
- errorMessage: will be set to any error message encountered during layer creation
.. versionadded:: 3.4.5
%End
QgsNewVectorLayerDialog( QWidget *parent /TransferThis/ = 0, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
%Docstring
New dialog constructor.
%End
QgsWkbTypes::Type selectedType() const;
%Docstring
Returns the selected geometry type
%End
void attributes( QList< QPair<QString, QString> > &at ) const;
%Docstring
Appends the chosen attribute names and types to at
%End
QString selectedFileFormat() const;
%Docstring
Returns the file format for storage
%End
QString selectedFileEncoding() const;
%Docstring
Returns the file format for storage
%End
QString filename() const;
%Docstring
Returns the name for the new layer
.. seealso:: :py:func:`setFilename`
%End
void setFilename( const QString &filename );
%Docstring
Sets the initial file name to show in the dialog.
.. seealso:: :py:func:`filename`
.. versionadded:: 3.6
%End
QgsCoordinateReferenceSystem crs() const;
%Docstring
Returns the selected CRS for the new layer.
.. seealso:: :py:func:`setCrs`
%End
void setCrs( const QgsCoordinateReferenceSystem &crs );
%Docstring
Sets the ``crs`` value for the new layer in the dialog.
.. seealso:: :py:func:`crs`
.. versionadded:: 3.0
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsnewvectorlayerdialog.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/