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
|
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/proj/qgsprojectionselectiontreewidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsProjectionSelectionTreeWidget : QWidget
{
%Docstring(signature="appended")
A widget for selecting a coordinate reference system from a tree.
This widget implements a tree view of projections, as seen in the
:py:class:`QgsProjectionSelectionDialog` dialog. In most cases it is
more suitable to use the compact
:py:class:`QgsProjectionSelectionWidget` widget.
.. seealso:: :py:class:`QgsProjectionSelectionDialog`
.. seealso:: :py:class:`QgsProjectionSelectionWidget`
%End
%TypeHeaderCode
#include "qgsprojectionselectiontreewidget.h"
%End
public:
QgsProjectionSelectionTreeWidget( QWidget *parent /TransferThis/ = 0, QgsCoordinateReferenceSystemProxyModel::Filters filters = QgsCoordinateReferenceSystemProxyModel::FilterHorizontal | QgsCoordinateReferenceSystemProxyModel::FilterCompound );
%Docstring
Constructor for QgsProjectionSelectionTreeWidget, with the specified
``parent`` widget.
Since QGIS 3.34, 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
~QgsProjectionSelectionTreeWidget();
QgsCoordinateReferenceSystem crs() const;
%Docstring
Returns the CRS currently selected in the widget.
.. seealso:: :py:func:`setCrs`
%End
void setShowNoProjection( bool show );
%Docstring
Sets whether a "no/invalid" projection option should be shown. If this
option is selected, calling
:py:func:`~QgsProjectionSelectionTreeWidget.crs` will return an invalid
:py:class:`QgsCoordinateReferenceSystem`.
.. seealso:: :py:func:`showNoProjection`
%End
void setShowBoundsMap( bool show );
%Docstring
Sets whether to show the bounds preview map.
.. seealso:: :py:func:`showBoundsMap`
%End
bool showNoProjection() const;
%Docstring
Returns whether the "no/invalid" projection option is shown. If this
option is selected, calling
:py:func:`~QgsProjectionSelectionTreeWidget.crs` will return an invalid
:py:class:`QgsCoordinateReferenceSystem`.
.. seealso:: :py:func:`setShowNoProjection`
%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:`~QgsProjectionSelectionTreeWidget.setShowNoProjection`.
.. versionadded:: 3.16
%End
bool showBoundsMap() const;
%Docstring
Returns whether the bounds preview map is shown.
.. seealso:: :py:func:`setShowBoundsMap`
%End
bool hasValidSelection() const;
%Docstring
Returns ``True`` if the current selection in the widget is a valid
choice. Valid selections include any projection and also the "no/invalid
projection" option (if
:py:func:`~QgsProjectionSelectionTreeWidget.setShowNoProjection` was
called). Invalid selections are the group headers (such as "Geographic
Coordinate Systems")
%End
QgsRectangle previewRect() const;
%Docstring
The initial "preview" rectangle for the bounds overview map.
.. seealso:: :py:func:`previewRect`
%End
QgsCoordinateReferenceSystemProxyModel::Filters filters() const;
%Docstring
Returns the filters set on the available CRS.
.. seealso:: :py:func:`setFilters`
.. versionadded:: 3.34
%End
void setFilters( QgsCoordinateReferenceSystemProxyModel::Filters filters );
%Docstring
Sets ``filters`` for the available CRS.
.. seealso:: :py:func:`filters`
.. versionadded:: 3.34
%End
public slots:
void setCrs( const QgsCoordinateReferenceSystem &crs );
%Docstring
Sets the initial ``crs`` to show within the dialog.
.. seealso:: :py:func:`crs`
%End
void setPreviewRect( const QgsRectangle &rect );
%Docstring
Sets the initial "preview" rectangle for the bounds overview map.
.. seealso:: :py:func:`previewRect`
%End
void setOgcWmsCrsFilter( const QSet<QString> &crsFilter );
%Docstring
Filters this widget by the given CRSs.
Sets this widget to filter the available projections to those listed by
the given Coordinate Reference Systems.
:param crsFilter: a list of the authority:id strings for Coordinate
Reference Systems to include in the widget.
%End
void pushProjectionToFront() /Deprecated/;
%Docstring
Marks the current selected projection for push to front of recent
projections list.
.. deprecated:: 3.40
Has no effect since QGIS 3.20.
%End
void clearRecentCrs();
%Docstring
Clear the list of recent projections.
.. versionadded:: 3.32
%End
signals:
void crsSelected();
%Docstring
Emitted when a projection is selected in the widget.
%End
void initialized() /Deprecated/;
%Docstring
Notifies others that the widget is now fully initialized, including
deferred selection of projection.
.. deprecated:: 3.40
No longer emitted.
%End
void projectionDoubleClicked();
%Docstring
Emitted when a projection is double clicked in the list.
%End
void hasValidSelectionChanged( bool isValid );
%Docstring
Emitted when the selection in the tree is changed from a valid selection
to an invalid selection, or vice-versa.
.. versionadded:: 3.18
%End
protected:
virtual void resizeEvent( QResizeEvent *event );
virtual bool eventFilter( QObject *obj, QEvent *ev );
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/proj/qgsprojectionselectiontreewidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
|