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¶
- 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: bool¶
- destinationTransformId: int¶
- isAvailable: bool¶
- proj: str¶
- sourceTransformId: int¶
- 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
- signal operationChanged[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- signal operationDoubleClicked[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- 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: