2017-06-08 11:26:03 +02:00
|
|
|
/************************************************************************
|
|
|
|
* 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
|
2017-02-27 16:58:04 +10:00
|
|
|
{
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
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:
|
|
|
|
|
|
|
|
If you wish to embed the projection selector into an existing dialog
|
|
|
|
the you probably want to look at QgsProjectionSelectionWidget instead.
|
|
|
|
|
2017-06-08 11:26:03 +02:00
|
|
|
.. versionadded:: 3.0
|
2017-02-27 16:58:04 +10:00
|
|
|
%End
|
|
|
|
|
2017-06-08 11:26:03 +02:00
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsprojectionselectiondialog.h"
|
|
|
|
%End
|
2017-02-27 16:58:04 +10:00
|
|
|
public:
|
2017-06-08 11:26:03 +02:00
|
|
|
|
2017-02-27 16:58:04 +10:00
|
|
|
QgsProjectionSelectionDialog( QWidget *parent /TransferThis/ = 0,
|
2017-06-08 11:26:03 +02:00
|
|
|
Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Constructor for QgsProjectionSelectionDialog.
|
2017-06-08 11:26:03 +02:00
|
|
|
%End
|
|
|
|
|
2017-02-27 16:58:04 +10:00
|
|
|
QgsCoordinateReferenceSystem crs() const;
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the CRS currently selected in the widget.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setCrs`
|
2018-05-28 11:31:08 -04:00
|
|
|
|
|
|
|
.. versionadded:: 3.0
|
2017-06-08 11:26:03 +02:00
|
|
|
%End
|
2017-02-27 16:58:04 +10:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void setMessage( const QString &message );
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
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'.
|
2017-06-08 11:26:03 +02:00
|
|
|
%End
|
2017-02-27 16:58:04 +10:00
|
|
|
|
2017-03-01 10:14:37 +10:00
|
|
|
void setShowNoProjection( bool show );
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets whether a "no/invalid" projection option should be shown. If this
|
2017-12-19 11:43:52 -04:00
|
|
|
option is selected, calling crs() will return an invalid :py:class:`QgsCoordinateReferenceSystem`.
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`showNoProjection`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-06-08 11:26:03 +02:00
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
2017-03-01 10:14:37 +10:00
|
|
|
|
|
|
|
bool showNoProjection() const;
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns whether the "no/invalid" projection option is shown. If this
|
2017-12-19 11:43:52 -04:00
|
|
|
option is selected, calling crs() will return an invalid :py:class:`QgsCoordinateReferenceSystem`.
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setShowNoProjection`
|
2018-05-28 11:31:08 -04:00
|
|
|
|
|
|
|
.. versionadded:: 3.0
|
2017-06-08 11:26:03 +02:00
|
|
|
%End
|
2017-03-01 10:14:37 +10:00
|
|
|
|
2017-02-27 16:58:04 +10:00
|
|
|
public slots:
|
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void setCrs( const QgsCoordinateReferenceSystem &crs );
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the initial ``crs`` to show within the dialog.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`crs`
|
2018-05-28 11:31:08 -04:00
|
|
|
|
|
|
|
.. versionadded:: 3.0
|
2017-06-08 11:26:03 +02:00
|
|
|
%End
|
2017-02-27 16:58:04 +10:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void setOgcWmsCrsFilter( const QSet<QString> &crsFilter );
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
2018-05-26 14:10:30 +10:00
|
|
|
filters this dialog by the given CRSs
|
2017-06-08 11:26:03 +02:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets this dialog to filter the available projections to those listed
|
|
|
|
by the given Coordinate Reference Systems.
|
2017-06-08 11:26:03 +02:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param crsFilter: a list of OGC Coordinate Reference Systems to filter the
|
2018-05-24 21:21:14 +10:00
|
|
|
list of projections by. This is useful in (e.g.) WMS situations
|
|
|
|
where you just want to offer what the WMS server can support.
|
2017-06-08 11:26:03 +02:00
|
|
|
|
2017-12-23 14:30:08 +10:00
|
|
|
.. warning::
|
|
|
|
|
|
|
|
This function's behavior is undefined if it is called after the dialog is shown.
|
2017-06-08 11:26:03 +02:00
|
|
|
%End
|
|
|
|
|
2017-02-27 16:58:04 +10:00
|
|
|
};
|
2017-06-08 11:26:03 +02:00
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/gui/qgsprojectionselectiondialog.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|