Skip to content
Permalink
Browse files
Split off part of custom projection dialog into reusable
QgsCrsDefinitionWidget widget
  • Loading branch information
nyalldawson committed Jan 11, 2022
1 parent 85b7f47 commit 0ad1324780c59ae6938bcd8f325adaf1807aa082
@@ -0,0 +1,98 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgscrsdefinitionwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/




class QgsCrsDefinitionWidget : QWidget
{
%Docstring(signature="appended")
A widget for definition a custom coordinate reference system.

.. versionadded:: 3.24
%End

%TypeHeaderCode
#include "qgscrsdefinitionwidget.h"
%End
public:

QgsCrsDefinitionWidget( QWidget *parent /TransferThis/ = 0 );
%Docstring
Constructor for QgsCrsDefinitionWidget, with the specified ``parent`` widget.
%End

QgsCoordinateReferenceSystem crs() const;
%Docstring
Returns the current CRS as defined in the widget.

An invalid CRS may be returned if no CRS is defined in the widget.

.. seealso:: :py:func:`setCrs`
%End

void setCrs( const QgsCoordinateReferenceSystem &crs, QgsCoordinateReferenceSystem::Format nativeFormat = QgsCoordinateReferenceSystem::Format::FormatWkt );
%Docstring
Sets the current ``crs`` to display in the widget.

The ``nativeFormat`` argument specifies the format (e.g. WKT or PROJ) is natively associated
with the custom CRS.

.. seealso:: :py:func:`crs`
%End

QgsCoordinateReferenceSystem::Format format() const;
%Docstring
Returns the selected CRS format.

.. seealso:: :py:func:`setFormat`
%End

void setFormat( QgsCoordinateReferenceSystem::Format format );
%Docstring
Sets the CRS ``format``.

.. seealso:: :py:func:`format`
%End

QString definitionString() const;
%Docstring
Returns the current definition string.

This represents the unaltered user-entered definition string, which may represent
either a WKT or PROJ string (see :py:func:`~QgsCrsDefinitionWidget.format`), and may not represent a valid CRS definition.

.. seealso:: :py:func:`setDefinitionString`
%End

void setDefinitionString( const QString &definition );
%Docstring
Sets the current ``definition`` string.

This represents the unaltered user-entered definition string, which may represent
either a WKT or PROJ string (see :py:func:`~QgsCrsDefinitionWidget.format`), and may not represent a valid CRS definition.

.. seealso:: :py:func:`definitionString`
%End

signals:

void crsChanged();
%Docstring
Emitted when the CRS defined in the widget is changed.
%End

};

/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgscrsdefinitionwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
@@ -39,6 +39,7 @@
%Include auto_generated/qgscoordinateboundspreviewmapwidget.sip
%Include auto_generated/qgscoordinateoperationwidget.sip
%Include auto_generated/qgscredentialdialog.sip
%Include auto_generated/qgscrsdefinitionwidget.sip
%Include auto_generated/qgscurveeditorwidget.sip
%Include auto_generated/qgscustomdrophandler.sip
%Include auto_generated/qgscustomprojectopenhandler.sip

0 comments on commit 0ad1324

Please sign in to comment.