mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-03 00:02:25 -05:00
"no crs" option at the top of the dialog. Instead, correctly label this option as "Use project CRS", which is what it actually means.
138 lines
4.2 KiB
Plaintext
138 lines
4.2 KiB
Plaintext
/************************************************************************
|
|
* 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
|
|
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 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
|
|
|
|
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 *
|
|
************************************************************************/
|