QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
Classes | Signals | Public Member Functions | List of all members
QgsCoordinateOperationWidget Class Reference

A widget for selecting the coordinate operation to use when transforming between a source and destination coordinate reference system. More...

#include <qgscoordinateoperationwidget.h>

Inheritance diagram for QgsCoordinateOperationWidget:
Inheritance graph
[legend]

Classes

struct  OperationDetails
 Coordinate operation details. More...
 

Signals

void operationChanged ()
 Emitted when the operation selected in the dialog is changed.
 
void operationDoubleClicked ()
 Emitted when an operation is double-clicked in the widget.
 

Public Member Functions

 QgsCoordinateOperationWidget (QWidget *parent=nullptr)
 Constructor for QgsCoordinateOperationWidget.
 
 ~QgsCoordinateOperationWidget () override
 
QList< QgsCoordinateOperationWidget::OperationDetailsavailableOperations () const
 Returns a list of the available operations shown in the widget.
 
QgsCoordinateOperationWidget::OperationDetails defaultOperation () const
 Returns the details of the default operation suggested by the widget.
 
QgsCoordinateReferenceSystem destinationCrs () const
 Returns the destination CRS for the operations shown in the widget.
 
bool hasSelection () const
 Returns true if there is a valid selection in the widget.
 
bool makeDefaultSelected () const
 Returns true if the "make default" option is selected.
 
QgsCoordinateOperationWidget::OperationDetails selectedOperation () const
 Returns the details of the operation currently selected within the widget.
 
void setDestinationCrs (const QgsCoordinateReferenceSystem &crs)
 Sets the destination crs for the operations shown in the widget.
 
void setMapCanvas (QgsMapCanvas *canvas)
 Sets a map canvas to link to the widget, which allows the widget's choices to reflect the current canvas state.
 
void setSelectedOperation (const QgsCoordinateOperationWidget::OperationDetails &operation)
 Sets the details of the operation currently selected within the widget.
 
void setSelectedOperationUsingContext (const QgsCoordinateTransformContext &context)
 Automatically sets the selected operation using the settings encapsulated in a transform context.
 
void setShowFallbackOption (bool visible)
 Sets whether the "allow fallback" operations option is visible.
 
void setShowMakeDefault (bool show)
 Sets whether the "make default" checkbox should be shown.
 
void setSourceCrs (const QgsCoordinateReferenceSystem &crs)
 Sets the source crs for the operations shown in the widget.
 
QgsCoordinateReferenceSystem sourceCrs () const
 Returns the source CRS for the operations shown in the widget.
 

Detailed Description

A widget for selecting the coordinate operation to use when transforming between a source and destination coordinate reference system.

Since
QGIS 3.12

Definition at line 33 of file qgscoordinateoperationwidget.h.

Constructor & Destructor Documentation

◆ QgsCoordinateOperationWidget()

QgsCoordinateOperationWidget::QgsCoordinateOperationWidget ( QWidget *  parent = nullptr)

Constructor for QgsCoordinateOperationWidget.

Definition at line 37 of file qgscoordinateoperationwidget.cpp.

◆ ~QgsCoordinateOperationWidget()

QgsCoordinateOperationWidget::~QgsCoordinateOperationWidget ( )
override

Definition at line 335 of file qgscoordinateoperationwidget.cpp.

Member Function Documentation

◆ availableOperations()

QList< QgsCoordinateOperationWidget::OperationDetails > QgsCoordinateOperationWidget::availableOperations ( ) const

Returns a list of the available operations shown in the widget.

Definition at line 115 of file qgscoordinateoperationwidget.cpp.

◆ defaultOperation()

QgsCoordinateOperationWidget::OperationDetails QgsCoordinateOperationWidget::defaultOperation ( ) const

Returns the details of the default operation suggested by the widget.

Definition at line 346 of file qgscoordinateoperationwidget.cpp.

◆ destinationCrs()

QgsCoordinateReferenceSystem QgsCoordinateOperationWidget::destinationCrs ( ) const
inline

Returns the destination CRS for the operations shown in the widget.

See also
setDestinationCrs()
sourceCrs()

Definition at line 78 of file qgscoordinateoperationwidget.h.

◆ hasSelection()

bool QgsCoordinateOperationWidget::hasSelection ( ) const

Returns true if there is a valid selection in the widget.

Definition at line 110 of file qgscoordinateoperationwidget.cpp.

◆ makeDefaultSelected()

bool QgsCoordinateOperationWidget::makeDefaultSelected ( ) const

Returns true if the "make default" option is selected.

Definition at line 105 of file qgscoordinateoperationwidget.cpp.

◆ operationChanged

void QgsCoordinateOperationWidget::operationChanged ( )
signal

Emitted when the operation selected in the dialog is changed.

◆ operationDoubleClicked

void QgsCoordinateOperationWidget::operationDoubleClicked ( )
signal

Emitted when an operation is double-clicked in the widget.

◆ selectedOperation()

QgsCoordinateOperationWidget::OperationDetails QgsCoordinateOperationWidget::selectedOperation ( ) const

Returns the details of the operation currently selected within the widget.

See also
setSelectedOperation()

Definition at line 376 of file qgscoordinateoperationwidget.cpp.

◆ setDestinationCrs()

void QgsCoordinateOperationWidget::setDestinationCrs ( const QgsCoordinateReferenceSystem crs)

Sets the destination crs for the operations shown in the widget.

See also
destinationCrs()
setSourceCrs()

Definition at line 557 of file qgscoordinateoperationwidget.cpp.

◆ setMapCanvas()

void QgsCoordinateOperationWidget::setMapCanvas ( QgsMapCanvas canvas)

Sets a map canvas to link to the widget, which allows the widget's choices to reflect the current canvas state.

Definition at line 71 of file qgscoordinateoperationwidget.cpp.

◆ setSelectedOperation()

void QgsCoordinateOperationWidget::setSelectedOperation ( const QgsCoordinateOperationWidget::OperationDetails operation)

Sets the details of the operation currently selected within the widget.

See also
selectedOperation()

Definition at line 400 of file qgscoordinateoperationwidget.cpp.

◆ setSelectedOperationUsingContext()

void QgsCoordinateOperationWidget::setSelectedOperationUsingContext ( const QgsCoordinateTransformContext context)

Automatically sets the selected operation using the settings encapsulated in a transform context.

If no matching operations are found within the context then the defaultOperation() will be selected.

Definition at line 422 of file qgscoordinateoperationwidget.cpp.

◆ setShowFallbackOption()

void QgsCoordinateOperationWidget::setShowFallbackOption ( bool  visible)

Sets whether the "allow fallback" operations option is visible.

Since
QGIS 3.12

Definition at line 438 of file qgscoordinateoperationwidget.cpp.

◆ setShowMakeDefault()

void QgsCoordinateOperationWidget::setShowMakeDefault ( bool  show)

Sets whether the "make default" checkbox should be shown.

Definition at line 100 of file qgscoordinateoperationwidget.cpp.

◆ setSourceCrs()

void QgsCoordinateOperationWidget::setSourceCrs ( const QgsCoordinateReferenceSystem crs)

Sets the source crs for the operations shown in the widget.

See also
sourceCrs()
setDestinationCrs()

Definition at line 550 of file qgscoordinateoperationwidget.cpp.

◆ sourceCrs()

QgsCoordinateReferenceSystem QgsCoordinateOperationWidget::sourceCrs ( ) const
inline

Returns the source CRS for the operations shown in the widget.

See also
setSourceCrs()
destinationCrs()

Definition at line 70 of file qgscoordinateoperationwidget.h.


The documentation for this class was generated from the following files: