Skip to content
Permalink
Browse files

Move guts of datum transformation dialog to a new standalone widget

QgsCoordinateOperationWidget

This widget shows a list of the available operations between a source
and destination CRS along with their properties
  • Loading branch information
nyalldawson committed Dec 19, 2019
1 parent 2a01772 commit cb8b4a88310f2b0128a84a6b1d71b94bcf5aac5e
@@ -0,0 +1,123 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgscoordinateoperationwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/




class QgsCoordinateOperationWidget : QWidget
{
%Docstring
A widget for selecting the coordinate operation to use when transforming between
a source and destination coordinate reference system.

.. versionadded:: 3.12
%End

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

struct OperationDetails
{
int sourceTransformId;

int destinationTransformId;

QString proj;
};

QgsCoordinateOperationWidget( QWidget *parent = 0 );
%Docstring
Constructor for QgsCoordinateOperationWidget.
%End

~QgsCoordinateOperationWidget();

QgsCoordinateReferenceSystem sourceCrs() const;
%Docstring
Returns the source CRS for the operations shown in the widget.

.. seealso:: :py:func:`setSourceCrs`

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

QgsCoordinateReferenceSystem destinationCrs() const;
%Docstring
Returns the destination CRS for the operations shown in the widget.

.. seealso:: :py:func:`setDestinationCrs`

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

void setSourceCrs( const QgsCoordinateReferenceSystem &crs );
%Docstring
Sets the source ``crs`` for the operations shown in the widget.

.. seealso:: :py:func:`sourceCrs`

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

void setDestinationCrs( const QgsCoordinateReferenceSystem &crs );
%Docstring
Sets the destination ``crs`` for the operations shown in the widget.

.. seealso:: :py:func:`destinationCrs`

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

void setMapCanvas( QgsMapCanvas *canvas );
%Docstring
Sets a map ``canvas`` to link to the widget, which allows the widget's choices to reflect
the current canvas state.
%End

void setShowMakeDefault( bool show );
%Docstring
Sets whether the "make default" checkbox should be shown.
%End

QgsCoordinateOperationWidget::OperationDetails defaultOperation() const;
%Docstring
Returns the details of the default operation suggested by the widget.
%End

QgsCoordinateOperationWidget::OperationDetails selectedOperation() const;
%Docstring
Returns the details of the operation currently selected within the widget.

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

void setSelectedOperation( const QgsCoordinateOperationWidget::OperationDetails &operation ) const;
%Docstring
Sets the details of the ``operation`` currently selected within the widget.

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

signals:

void operationChanged();
%Docstring
Emitted when the operation selected in the dialog is changed.
%End

};

/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgscoordinateoperationwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
@@ -50,6 +50,7 @@
%Include auto_generated/qgscompoundcolorwidget.sip
%Include auto_generated/qgsconfigureshortcutsdialog.sip
%Include auto_generated/qgscoordinateboundspreviewmapwidget.sip
%Include auto_generated/qgscoordinateoperationwidget.sip
%Include auto_generated/qgscredentialdialog.sip
%Include auto_generated/qgscurveeditorwidget.sip
%Include auto_generated/qgscustomdrophandler.sip
@@ -272,6 +272,7 @@ SET(QGIS_GUI_SRCS
qgscompoundcolorwidget.cpp
qgsconfigureshortcutsdialog.cpp
qgscoordinateboundspreviewmapwidget.cpp
qgscoordinateoperationwidget.cpp
qgscredentialdialog.cpp
qgscustomdrophandler.cpp
qgscurveeditorwidget.cpp
@@ -471,6 +472,7 @@ SET(QGIS_GUI_HDRS
qgscompoundcolorwidget.h
qgsconfigureshortcutsdialog.h
qgscoordinateboundspreviewmapwidget.h
qgscoordinateoperationwidget.h
qgscredentialdialog.h
qgscurveeditorwidget.h
qgscustomdrophandler.h

0 comments on commit cb8b4a8

Please sign in to comment.
You can’t perform that action at this time.