Class: QgsCoordinateOperationWidget¶
A widget for selecting the coordinate operation to use when transforming between a source and destination coordinate reference system.
Added in version 3.12.
QgsCoordinateOperationWidget¶
Class Hierarchy¶
Base classes¶
Methods
Returns a list of the available operations shown in the widget. |
|
Returns the details of the default operation suggested by the widget. |
|
Returns the destination CRS for the operations shown in the widget. |
|
Returns |
|
Returns |
|
Returns the details of the operation currently selected within the widget. |
|
Sets the destination crs for the operations shown in the widget. |
|
Sets a map canvas to link to the widget, which allows the widget's choices to reflect the current canvas state. |
|
Sets the details of the operation currently selected within the widget. |
|
Automatically sets the selected operation using the settings encapsulated in a transform context. |
|
Sets whether the "allow fallback" operations option is visible. |
|
Sets whether the "make default" checkbox should be shown. |
|
Sets the source crs for the operations shown in the widget. |
|
Returns the source CRS for the operations shown in the widget. |
Signals
Emitted when the operation selected in the dialog is changed. |
|
Emitted when an operation is double-clicked in the widget. |
- class qgis.gui.QgsCoordinateOperationWidget[source]¶
Bases:
QWidget- __init__(parent: QWidget | None = None)
Constructor for QgsCoordinateOperationWidget.
- Parameters:
parent (Optional[QWidget] = None)
- class OperationDetails¶
Bases:
objectCoordinate operation details
- allowFallback¶
Trueif fallback transforms can be used
- destinationTransformId¶
Destination transform ID
- isAvailable¶
Trueif operation is available
- proj¶
Proj coordinate operation description, for Proj >= 6.0 builds only
- sourceTransformId¶
Source transform ID
- availableOperations(self) List[QgsCoordinateOperationWidget.OperationDetails]¶
Returns a list of the available operations shown in the widget.
- Return type:
- defaultOperation(self) QgsCoordinateOperationWidget.OperationDetails[source]¶
Returns the details of the default operation suggested by the widget.
- Return type:
- destinationCrs(self) QgsCoordinateReferenceSystem[source]¶
Returns the destination CRS for the operations shown in the widget.
See also
See also
- Return type:
- hasSelection(self) bool[source]¶
Returns
Trueif there is a valid selection in the widget.- Return type:
bool
- makeDefaultSelected(self) bool[source]¶
Returns
Trueif the “make default” option is selected.- Return type:
bool
- selectedOperation(self) QgsCoordinateOperationWidget.OperationDetails[source]¶
Returns the details of the operation currently selected within the widget.
See also
- Return type:
- setDestinationCrs(self, crs: QgsCoordinateReferenceSystem)[source]¶
Sets the destination
crsfor the operations shown in the widget.See also
See also
- Parameters:
- setMapCanvas(self, canvas: QgsMapCanvas | None)[source]¶
Sets a map
canvasto link to the widget, which allows the widget’s choices to reflect the current canvas state.- Parameters:
canvas (Optional[QgsMapCanvas])
- setSelectedOperation(self, operation: QgsCoordinateOperationWidget.OperationDetails)[source]¶
Sets the details of the
operationcurrently selected within the widget.See also
- Parameters:
operation (QgsCoordinateOperationWidget.OperationDetails)
- setSelectedOperationUsingContext(self, context: QgsCoordinateTransformContext)[source]¶
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.- Parameters:
context (QgsCoordinateTransformContext)
- setShowFallbackOption(self, visible: bool)[source]¶
Sets whether the “allow fallback” operations option is visible.
Added in version 3.12.
- Parameters:
visible (bool)
- setShowMakeDefault(self, show: bool)[source]¶
Sets whether the “make default” checkbox should be shown.
- Parameters:
show (bool)
- setSourceCrs(self, crs: QgsCoordinateReferenceSystem)[source]¶
Sets the source
crsfor the operations shown in the widget.See also
See also
- Parameters:
- sourceCrs(self) QgsCoordinateReferenceSystem[source]¶
Returns the source CRS for the operations shown in the widget.
See also
See also
- Return type: