File: qgsnewvectorlayerdialog.sip.in

package info (click to toggle)
qgis 3.40.10%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,183,672 kB
  • sloc: cpp: 1,595,771; python: 372,544; xml: 23,474; sh: 3,761; perl: 3,664; ansic: 2,257; sql: 2,137; yacc: 1,068; lex: 577; javascript: 540; lisp: 411; makefile: 161
file content (125 lines) | stat: -rw-r--r-- 4,134 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/gui/qgsnewvectorlayerdialog.h                                    *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py 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:: 3.4.5

   Use :py:func:`~QgsNewVectorLayerDialog.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 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: any error message encountered during layer
           creation
         - encoding: file encoding of created layer

.. versionadded:: 3.4.5
%End

    QgsNewVectorLayerDialog( QWidget *parent /TransferThis/ = 0, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
%Docstring
New dialog constructor.
%End
    Qgis::WkbType 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`
%End

  public slots:
    virtual void accept();


};

/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/gui/qgsnewvectorlayerdialog.h                                    *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/