QGIS/python/gui/auto_generated/proj/qgsprojectionselectiondialog.sip.in
Nyall Dawson 3f6b490218 Sipify
2025-04-02 11:11:10 +10:00

308 lines
9.1 KiB
Plaintext

/************************************************************************
* 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 *
************************************************************************/