File: qgsprojectionselectionwidget.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 (183 lines) | stat: -rw-r--r-- 4,662 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
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
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/gui/qgsprojectionselectionwidget.h                               *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 ************************************************************************/






class QgsProjectionSelectionWidget : QWidget
{
%Docstring(signature="appended")
A widget for selecting a projection.

.. versionadded:: 2.7
%End

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

    enum CrsOption
    {
      LayerCrs,
      ProjectCrs,
      CurrentCrs,
      DefaultCrs,
      RecentCrs,
      CrsNotSet,
    };

    explicit QgsProjectionSelectionWidget( QWidget *parent /TransferThis/ = 0 );
%Docstring
Constructor for QgsProjectionSelectionWidget
%End

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

:return: current CRS
%End

    void setOptionVisible( CrsOption option, bool visible );
%Docstring
Sets whether a predefined CRS option should be shown in the widget.

:param option: CRS option to show/hide
:param visible: whether the option should be shown

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

    bool optionVisible( CrsOption option ) const;
%Docstring
Returns whether the specified CRS option is visible in the widget.

.. seealso:: :py:func:`setOptionVisible`

.. 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:`~QgsProjectionSelectionWidget.setOptionVisible`.

.. versionadded:: 3.0
%End

    void setMessage( const QString &text );
%Docstring
Sets a ``message`` to show in the dialog. If an empty string is
passed, the message will be a generic
'define the CRS for this layer'.

.. versionadded:: 3.0
%End


    bool showAccuracyWarnings() const;
%Docstring
Returns ``True`` if the widget will show a warning to users when they select a CRS which has
low accuracy.

.. seealso:: :py:func:`setShowAccuracyWarnings`

.. versionadded:: 3.20
%End

    void setShowAccuracyWarnings( bool show );
%Docstring
Sets whether the widget will ``show`` warnings to users when they select a CRS which has
low accuracy.

.. seealso:: :py:func:`showAccuracyWarnings`

.. versionadded:: 3.20
%End

    void setSourceEnsemble( const QString &ensemble );
%Docstring
Sets the original source ``ensemble`` datum name.

If set, CRS accuracy warnings will not be shown when the selected CRS in the widget has a matching
ensemble datum, regardless of the ensemble's accuracy.

.. seealso:: :py:func:`sourceEnsemble`

.. versionadded:: 3.20
%End

    QString sourceEnsemble() const;
%Docstring
Returns the original source ensemble datum name.

If set, CRS accuracy warnings will not be shown when the selected CRS in the widget has a matching
ensemble datum, regardless of the ensemble's accuracy.

.. seealso:: :py:func:`setSourceEnsemble`

.. versionadded:: 3.20
%End

  signals:

    void crsChanged( const QgsCoordinateReferenceSystem & );
%Docstring
Emitted when the selected CRS is changed
%End

    void cleared();
%Docstring
Emitted when the not set option is selected.

.. versionadded:: 3.0
%End

  public slots:

    void setCrs( const QgsCoordinateReferenceSystem &crs );
%Docstring
Sets the current CRS for the widget

:param crs: new CRS
%End

    void setLayerCrs( const QgsCoordinateReferenceSystem &crs );
%Docstring
Sets the layer CRS for the widget. If set, this will be added as an option
to the preset CRSes shown in the widget.

:param crs: layer CRS
%End

    void selectCrs();
%Docstring
Opens the dialog for selecting a new CRS
%End

  protected:

    virtual void dragEnterEvent( QDragEnterEvent *event );

    virtual void dragLeaveEvent( QDragLeaveEvent *event );

    virtual void dropEvent( QDropEvent *event );


};

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