File: qgsprojectionselectiondialog.sip.in

package info (click to toggle)
qgis 3.22.16%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,186,020 kB
  • sloc: cpp: 1,275,562; python: 194,091; xml: 15,597; perl: 3,471; sh: 3,368; sql: 2,485; ansic: 2,219; yacc: 1,056; lex: 574; javascript: 504; lisp: 411; makefile: 227
file content (145 lines) | stat: -rw-r--r-- 4,560 bytes parent folder | download
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
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/gui/qgsprojectionselectiondialog.h                               *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 ************************************************************************/





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.

.. versionadded:: 3.0
%End

%TypeHeaderCode
#include "qgsprojectionselectiondialog.h"
%End
  public:

    QgsProjectionSelectionDialog( QWidget *parent /TransferThis/ = 0,
                                  Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
%Docstring
Constructor for QgsProjectionSelectionDialog.
%End

    ~QgsProjectionSelectionDialog();

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

.. seealso:: :py:func:`setCrs`

.. versionadded:: 3.0
%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`

.. versionadded:: 3.0
%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`

.. versionadded:: 3.0
%End

    void setNotSetText( const QString &text );
%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`.

.. 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

  public slots:

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

.. seealso:: :py:func:`crs`

.. versionadded:: 3.0
%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/qgsprojectionselectiondialog.h                               *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 ************************************************************************/