File: qgsprojectionselectiondialog.sip.in

package info (click to toggle)
qgis 3.40.11%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,183,800 kB
  • sloc: cpp: 1,595,841; python: 372,637; 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: 154
file content (307 lines) | stat: -rw-r--r-- 9,317 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/gui/proj/qgsprojectionselectiondialog.h                          *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/





class QgsCrsSelectionWidget : QgsPanelWidget
{
%Docstring(signature="appended")
A generic widget allowing users to pick a Coordinate Reference System
(or define their own).

.. versionadded:: 3.24
%End

%TypeHeaderCode
#include "qgsprojectionselectiondialog.h"
%End
  public:
    QgsCrsSelectionWidget( QWidget *parent /TransferThis/ = 0, QgsCoordinateReferenceSystemProxyModel::Filters filters = QgsCoordinateReferenceSystemProxyModel::FilterHorizontal | QgsCoordinateReferenceSystemProxyModel::FilterCompound );
%Docstring
Constructor for QgsCrsSelectionWidget, with the specified ``parent``
widget.

Since QGIS 3.36, the optional ``filter`` argument can be used to specify
filters on the systems shown in the widget. The default is to show all
horizontal and compound CRS in order to match the behavior of older QGIS
releases. The ``filter`` can be altered to also include vertical CRS if
desired.
%End

    ~QgsCrsSelectionWidget();

    QgsCoordinateReferenceSystem crs() const;
%Docstring
Returns the CRS currently selected in the widget.

.. seealso:: :py:func:`setCrs`
%End

    void setMessage( const QString &message );
%Docstring
Sets a ``message`` to show in the dialog.
%End

    void setShowNoCrs( bool show );
%Docstring
Sets whether a "no/invalid" CRS option should be shown. If this option
is selected, calling :py:func:`~QgsCrsSelectionWidget.crs` will return
an invalid :py:class:`QgsCoordinateReferenceSystem`.

.. seealso:: :py:func:`showNoCrs`
%End

    bool showNoCrs() const;
%Docstring
Returns whether the "no/invalid" CRS option is shown. If this option is
selected, calling :py:func:`~QgsCrsSelectionWidget.crs` will return an
invalid :py:class:`QgsCoordinateReferenceSystem`.

.. seealso:: :py:func:`setShowNoCrs`
%End

    void setNotSetText( const QString &text, const QString &description = QString() );
%Docstring
Sets the text to show for the not set option. Note that this option is
not shown by default and must be set visible by calling
:py:func:`~QgsCrsSelectionWidget.setShowNoCrs`.

The ``description`` argument can be used to specify a detailed
description which is shown when the option is selected.
%End

    bool hasValidSelection() const;
%Docstring
Returns ``True`` if the widget has a valid CRS defined.
%End

    QgsCoordinateReferenceSystemProxyModel::Filters filters() const;
%Docstring
Returns the filters set on the available CRS.

.. seealso:: :py:func:`setFilters`

.. versionadded:: 3.36
%End

    void setFilters( QgsCoordinateReferenceSystemProxyModel::Filters filters );
%Docstring
Sets ``filters`` for the available CRS.

.. seealso:: :py:func:`filters`

.. versionadded:: 3.36
%End

  public slots:

    void setCrs( const QgsCoordinateReferenceSystem &crs );
%Docstring
Sets the ``crs`` to show within the widget.

.. seealso:: :py:func:`crs`
%End

    void setOgcWmsCrsFilter( const QSet<QString> &crsFilter );
%Docstring
filters this dialog by the given CRSs

Sets this dialog to filter the available CRSs to those listed by the
given Coordinate Reference Systems.

:param crsFilter: a list of OGC Coordinate Reference Systems to filter
                  the list of CRS by. This is useful in (e.g.) WMS
                  situations where you just want to offer what the WMS
                  server can support.

.. warning::

   This function's behavior is undefined if it is called after the dialog is shown.
%End

  signals:

    void crsChanged();
%Docstring
Emitted when the CRS defined in the widget is changed.
%End

    void crsDoubleClicked( const QgsCoordinateReferenceSystem &crs );
%Docstring
Emitted when a CRS entry in the widget is double-clicked.
%End

    void hasValidSelectionChanged( bool isValid );
%Docstring
Emitted when the widget has a valid selection or not.
%End

};


class QgsProjectionSelectionDialog : QDialog
{
%Docstring(signature="appended")
A generic dialog to prompt the user for a Coordinate Reference System.

Typically you will use this when you want to prompt the user for a
coordinate system identifier e.g. from a plugin you might do this to get
an epsg code:

.. code-block:: python

         crs = QgsCoordinateReferenceSystem()
         mySelector = QgsProjectionSelectionDialog( iface.mainWindow() )
         mySelector.setCrs( crs )
         if mySelector.exec():
           mCrs = mySelector.crs()

If you wish to embed the projection selector into an existing dialog the
you probably want to look at :py:class:`QgsProjectionSelectionWidget`
instead.
%End

%TypeHeaderCode
#include "qgsprojectionselectiondialog.h"
%End
  public:
    QgsProjectionSelectionDialog( QWidget *parent /TransferThis/ = 0, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags, QgsCoordinateReferenceSystemProxyModel::Filters filters = QgsCoordinateReferenceSystemProxyModel::FilterHorizontal | QgsCoordinateReferenceSystemProxyModel::FilterCompound );
%Docstring
Constructor for QgsProjectionSelectionDialog.

Since QGIS 3.36, the optional ``filter`` argument can be used to specify
filters on the systems shown in the dialog. The default is to show all
horizontal and compound CRS in order to match the behavior of older QGIS
releases. The ``filter`` can be altered to also include vertical CRS if
desired.
%End

    QgsCoordinateReferenceSystem crs() const;
%Docstring
Returns the CRS currently selected in the widget.

.. seealso:: :py:func:`setCrs`
%End

    void setMessage( const QString &message );
%Docstring
Sets a ``message`` to show in the dialog.

.. seealso:: :py:func:`showNoCrsForLayerMessage`
%End

    void showNoCrsForLayerMessage();
%Docstring
When called, the dialog will show a default "layer has no CRS set"
message above the projection selector.

.. seealso:: :py:func:`setMessage`

.. versionadded:: 3.16
%End

    void setShowNoProjection( bool show );
%Docstring
Sets whether a "no/invalid" projection option should be shown. If this
option is selected, calling :py:func:`~QgsProjectionSelectionDialog.crs`
will return an invalid :py:class:`QgsCoordinateReferenceSystem`.

.. seealso:: :py:func:`showNoProjection`
%End

    bool showNoProjection() const;
%Docstring
Returns whether the "no/invalid" projection option is shown. If this
option is selected, calling :py:func:`~QgsProjectionSelectionDialog.crs`
will return an invalid :py:class:`QgsCoordinateReferenceSystem`.

.. seealso:: :py:func:`setShowNoProjection`
%End

    void setNotSetText( const QString &text, const QString &description = QString() );
%Docstring
Sets the text to show for the not set option. Note that this option is
not shown by default and must be set visible by calling
:py:func:`~QgsProjectionSelectionDialog.setShowNoProjection`.

Since QGIS 3.24, the ``description`` argument can be used to specify a
detailed description which is shown when the option is selected.

.. versionadded:: 3.16
%End

    void setRequireValidSelection();
%Docstring
Sets the dialog to require a valid selection only, preventing users from
accepting the dialog if no selection is present.

.. versionadded:: 3.18
%End

    bool hasValidSelection() const;
%Docstring
Returns ``True`` if the dialog has a valid CRS defined.

.. versionadded:: 3.24
%End

    QgsCoordinateReferenceSystemProxyModel::Filters filters() const;
%Docstring
Returns the filters set on the available CRS.

.. seealso:: :py:func:`setFilters`

.. versionadded:: 3.36
%End

    void setFilters( QgsCoordinateReferenceSystemProxyModel::Filters filters );
%Docstring
Sets ``filters`` for the available CRS.

.. seealso:: :py:func:`filters`

.. versionadded:: 3.36
%End

  public slots:

    void setCrs( const QgsCoordinateReferenceSystem &crs );
%Docstring
Sets the initial ``crs`` to show within the dialog.

.. seealso:: :py:func:`crs`
%End

    void setOgcWmsCrsFilter( const QSet<QString> &crsFilter );
%Docstring
filters this dialog by the given CRSs

Sets this dialog to filter the available projections to those listed by
the given Coordinate Reference Systems.

:param crsFilter: a list of OGC Coordinate Reference Systems to filter
                  the list of projections by. This is useful in (e.g.)
                  WMS situations where you just want to offer what the
                  WMS server can support.

.. warning::

   This function's behavior is undefined if it is called after the dialog is shown.
%End

};

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