2017-06-08 11:26:03 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/gui/qgsprojectionselectionwidget.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-05 10:54:10 +01:00
|
|
|
class QgsProjectionSelectionWidget : QWidget
|
|
|
|
{
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
A widget for selecting a projection.
|
|
|
|
.. versionadded:: 2.7
|
2015-01-05 10:54:10 +01:00
|
|
|
%End
|
|
|
|
|
2017-06-08 11:26:03 +02:00
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsprojectionselectionwidget.h"
|
|
|
|
%End
|
2015-01-05 10:54:10 +01:00
|
|
|
public:
|
2015-01-06 10:26:45 +11:00
|
|
|
|
2015-01-19 16:11:39 +11:00
|
|
|
enum CrsOption
|
|
|
|
{
|
2017-06-08 11:26:03 +02:00
|
|
|
LayerCrs,
|
|
|
|
ProjectCrs,
|
|
|
|
CurrentCrs,
|
|
|
|
DefaultCrs,
|
|
|
|
RecentCrs,
|
|
|
|
CrsNotSet,
|
2015-01-19 16:11:39 +11:00
|
|
|
};
|
|
|
|
|
2015-01-05 10:54:10 +01:00
|
|
|
explicit QgsProjectionSelectionWidget( QWidget *parent /TransferThis/ = 0 );
|
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
QgsProjectionSelectionDialog *dialog();
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
Returns a pointer to the projection selector dialog used by the widget.
|
|
|
|
Can be used to modify how the projection selector dialog behaves.
|
|
|
|
:return: projection selector dialog
|
|
|
|
:rtype: QgsProjectionSelectionDialog
|
|
|
|
%End
|
2015-01-06 13:06:48 +11:00
|
|
|
|
2015-01-06 10:26:45 +11:00
|
|
|
QgsCoordinateReferenceSystem crs() const;
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the currently selected CRS for the widget
|
|
|
|
:return: current CRS
|
|
|
|
:rtype: QgsCoordinateReferenceSystem
|
|
|
|
%End
|
2015-01-06 10:26:45 +11:00
|
|
|
|
2015-01-19 16:11:39 +11:00
|
|
|
void setOptionVisible( const CrsOption option, const bool visible );
|
2017-06-08 11:26:03 +02:00
|
|
|
%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:: optionVisible()
|
|
|
|
%End
|
2015-01-19 16:11:39 +11:00
|
|
|
|
2016-11-11 19:44:59 +10:00
|
|
|
bool optionVisible( CrsOption option ) const;
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
Returns whether the specified CRS option is visible in the widget.
|
|
|
|
.. versionadded:: 3.0
|
|
|
|
.. seealso:: setOptionVisible()
|
|
|
|
:rtype: bool
|
|
|
|
%End
|
2016-11-11 19:44:59 +10:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void setNotSetText( const QString &text );
|
2017-06-08 11:26:03 +02:00
|
|
|
%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 setOptionVisible().
|
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
2016-11-11 19:44:59 +10:00
|
|
|
|
2015-01-05 10:54:10 +01:00
|
|
|
signals:
|
2015-01-06 10:26:45 +11:00
|
|
|
|
2017-06-08 11:26:03 +02:00
|
|
|
void crsChanged( const QgsCoordinateReferenceSystem & );
|
|
|
|
%Docstring
|
|
|
|
Emitted when the selected CRS is changed
|
|
|
|
%End
|
2015-01-05 10:54:10 +01:00
|
|
|
|
2016-11-11 19:44:59 +10:00
|
|
|
void cleared();
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
Emitted when the not set option is selected.
|
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
2016-11-11 19:44:59 +10:00
|
|
|
|
2015-01-05 10:54:10 +01:00
|
|
|
public slots:
|
2015-01-06 10:26:45 +11:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void setCrs( const QgsCoordinateReferenceSystem &crs );
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
Sets the current CRS for the widget
|
|
|
|
\param crs new CRS
|
|
|
|
%End
|
2015-01-19 16:11:39 +11:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void setLayerCrs( const QgsCoordinateReferenceSystem &crs );
|
2017-06-08 11:26:03 +02:00
|
|
|
%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
|
2015-01-06 10:26:45 +11:00
|
|
|
|
2015-01-05 10:54:10 +01:00
|
|
|
void selectCrs();
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
Opens the dialog for selecting a new CRS
|
|
|
|
%End
|
2015-01-19 16:11:39 +11:00
|
|
|
|
2015-01-05 10:54:10 +01:00
|
|
|
};
|
2017-06-08 11:26:03 +02:00
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/gui/qgsprojectionselectionwidget.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|